10Duke Scale C++ Client
Loading...
Searching...
No Matches
RandomURLSafeString.h
1#ifndef TENDUKE_UTL_RANDOM_RANDOMURLSAFESTRING_H
2#define TENDUKE_UTL_RANDOM_RANDOMURLSAFESTRING_H
3
4#include "./RandomBytes.h"
5
6#include <cstddef>
7#include <memory>
8#include <string>
9
10namespace tenduke { namespace utl { namespace random {
11
12
17{
18public:
23 explicit RandomUrlSafeString(std::shared_ptr<RandomBytes> randomBytes)
24 : randomBytes(std::move(randomBytes))
25 {}
26
32 virtual std::string generate(std::size_t length);
33
34private:
35 const std::shared_ptr<RandomBytes> randomBytes;
36};
37
38
39}}}
40
41#endif // TENDUKE_UTL_RANDOM_RANDOMURLSAFESTRING_H
Generates string of random URL-safe characters.
Definition RandomURLSafeString.h:17
virtual std::string generate(std::size_t length)
Generates random string.
Definition RandomURLSafeString.cpp:10
RandomUrlSafeString(std::shared_ptr< RandomBytes > randomBytes)
Constructs new instance.
Definition RandomURLSafeString.h:23
Utilities.
Definition Base64Decoder.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7