Kea
1.5.0
crypto_rng.cc
Go to the documentation of this file.
1
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#include <config.h>
8
9
#include <
cryptolink.h
>
10
#include <
cryptolink/crypto_rng.h
>
11
12
#include <boost/scoped_ptr.hpp>
13
14
#include <cstring>
15
16
namespace
isc
{
17
namespace
cryptolink {
18
19
RNG::RNG
() {
20
}
21
22
RNG::~RNG
() {
23
}
24
25
std::vector<uint8_t>
26
random
(
size_t
len)
27
{
28
RNGPtr
rng(
CryptoLink::getCryptoLink
().getRNG());
29
return
(rng->random(len));
30
}
31
32
}
// namespace cryptolink
33
}
// namespace isc
isc::cryptolink::RNG::RNG
RNG()
Constructor from a Random Number Generator.
Definition:
crypto_rng.cc:19
isc::cryptolink::CryptoLink::getCryptoLink
static CryptoLink & getCryptoLink()
Returns a reference to the singleton instance.
Definition:
cryptolink.cc:17
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:144
isc::cryptolink::RNGPtr
boost::shared_ptr< RNG > RNGPtr
Definition:
cryptolink.h:46
cryptolink.h
isc::cryptolink::RNG::~RNG
virtual ~RNG()
Destructor.
Definition:
crypto_rng.cc:22
crypto_rng.h
isc::cryptolink::random
std::vector< uint8_t > random(size_t len)
Generate random value.
Definition:
crypto_rng.cc:26
src
lib
cryptolink
crypto_rng.cc
Generated on Fri Jul 10 2020 09:12:51 for Kea by
1.8.18