4#include "Stroika/Foundation/StroikaPreComp.h"
14string Cryptography::Private_::mkArrayFmt_ (
const uint8_t* start,
const uint8_t* end)
17 size_t N = end - start;
18 result.reserve (2 * N + 1);
19 for (
const uint8_t* i = start; i != end; ++i) {
22 ::snprintf (b, Memory::NEltsOf (b),
"%02x", *i);
28string Cryptography::Private_::mkFmt_ (
unsigned int n)
32 ::snprintf (b, Memory::NEltsOf (b),
"0x%u", n);
36string Cryptography::Private_::mkFmt_ (
unsigned long n)
40 ::snprintf (b, Memory::NEltsOf (b),
"0x%lu", n);
44string Cryptography::Private_::mkFmt_ (
unsigned long long n)
48 ::snprintf (b, Memory::NEltsOf (b),
"0x%llu", n);