Virgil Security Crypto library  2.6.3
VirgilHKDF.h
1 
37 #ifndef VIRGIL_CRYPTO_FOUNDATION_VIRGIL_HKDF_H
38 #define VIRGIL_CRYPTO_FOUNDATION_VIRGIL_HKDF_H
39 
40 #include "../VirgilByteArray.h"
41 #include "VirgilHash.h"
42 
43 namespace virgil { namespace crypto { namespace foundation {
44 
50 class VirgilHKDF {
51 public:
56  VirgilHKDF(VirgilHash::Algorithm hashAlgorithm);
57 
71  const virgil::crypto::VirgilByteArray& info, size_t outSize) const;
72 
73 private:
75  const virgil::crypto::VirgilByteArray& keyMaterial, const virgil::crypto::VirgilByteArray& salt) const;
76 
78  const virgil::crypto::VirgilByteArray& pseudoRandomKey, const virgil::crypto::VirgilByteArray& info,
79  size_t outSize) const;
80 
81 private:
82  const VirgilHash::Algorithm hashAlgorithm_;
83 };
84 
85 }}}
86 
87 #endif //VIRGIL_CRYPTO_FOUNDATION_VIRGIL_HKDF_H
Algorithm
Enumerates possible Hash algorithms.
Definition: VirgilHash.h:57
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
VirgilHKDF(VirgilHash::Algorithm hashAlgorithm)
Define parameters for HKDF algorithm.
Implements HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)
Definition: VirgilHKDF.h:50
virgil::crypto::VirgilByteArray derive(const virgil::crypto::VirgilByteArray &in, const virgil::crypto::VirgilByteArray &salt, const virgil::crypto::VirgilByteArray &info, size_t outSize) const
Derive key from the given key material and additional options.