10Duke Enterprise C++ SDK
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:
19 virtual ~RandomUrlSafeString() = default;
20
25 explicit RandomUrlSafeString(std::shared_ptr<::tenduke::utl::random::RandomBytes> randomBytes)
26 : randomBytes(std::move(randomBytes))
27 {}
28
34 virtual std::string generate(std::size_t length);
35
36private:
37 const std::shared_ptr<::tenduke::utl::random::RandomBytes> randomBytes;
38};
39
40
41}}}
42
43#endif // TENDUKE_UTL_RANDOM_RANDOMURLSAFESTRING_H
RandomUrlSafeString(std::shared_ptr<::tenduke::utl::random::RandomBytes > randomBytes)
Constructs new instance.
Definition RandomURLSafeString.h:25
virtual std::string generate(std::size_t length)
Generates random string.
Definition RandomURLSafeString.cpp:10
RandomUrlSafeString(std::shared_ptr<::tenduke::utl::random::RandomBytes > randomBytes)
Constructs new instance.
Definition RandomURLSafeString.h:25
Random number / string generation.
Definition InsecureRandomBytes.h:8
Utilities.
Definition Base64Decoder.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4