59 template <
typename Hash>
78 Hash::hmac(key, in, out);
82 return Hash::BlankHash;
void hash(const folly::IOBuf &in, folly::MutableByteRange out) override
virtual size_t hashLength() const =0
std::vector< uint8_t > hkdfExtract(folly::ByteRange salt, folly::ByteRange ikm) override
folly::ByteRange blankHash() const override
virtual void hmac(folly::ByteRange key, const folly::IOBuf &in, folly::MutableByteRange out)=0
virtual folly::ByteRange blankHash() const =0
virtual Buf hkdfExpand(folly::ByteRange secret, Buf info, uint16_t length)=0
virtual std::vector< uint8_t > hkdfExtract(folly::ByteRange salt, folly::ByteRange ikm)=0
virtual Buf expandLabel(folly::ByteRange secret, folly::StringPiece label, Buf hashValue, uint16_t length)=0
std::unique_ptr< folly::IOBuf > Buf
virtual void hash(const folly::IOBuf &in, folly::MutableByteRange out)=0
static constexpr StringPiece secret
void hmac(folly::ByteRange key, const folly::IOBuf &in, folly::MutableByteRange out) override
virtual ~KeyDerivation()=default
size_t hashLength() const override
virtual std::vector< uint8_t > deriveSecret(folly::ByteRange secret, folly::StringPiece label, folly::ByteRange messageHash)=0