Kea  2.3.2-git
cryptolink.cc
Go to the documentation of this file.
1 // Copyright (C) 2011-2022 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 
10 #include <cryptolink/crypto_hash.h>
11 #include <cryptolink/crypto_hmac.h>
12 
13 namespace isc {
14 namespace cryptolink {
15 
16 CryptoLink&
18  static CryptoLink instance;
19  return (instance);
20 }
21 
22 Hash*
23 CryptoLink::createHash(const HashAlgorithm hash_algorithm) {
24  return (new Hash(hash_algorithm));
25 }
26 
27 HMAC*
28 CryptoLink::createHMAC(const void* secret, size_t secret_len,
29  const HashAlgorithm hash_algorithm) {
30  return (new HMAC(secret, secret_len, hash_algorithm));
31 }
32 
33 RNGPtr&
35  return (rng_);
36 }
37 
38 } // namespace cryptolink
39 } // namespace isc
40 
Defines the logger used by the top-level component of kea-lfc.