1 // Copyright 2013 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CRYPTO_HKDF_H_ 6 #define CRYPTO_HKDF_H_ 7 8 #include <stddef.h> 9 10 #include <string> 11 #include <string_view> 12 13 #include "base/containers/span.h" 14 #include "crypto/crypto_export.h" 15 16 namespace crypto { 17 18 CRYPTO_EXPORT 19 std::string HkdfSha256(std::string_view secret, 20 std::string_view salt, 21 std::string_view info, 22 size_t derived_key_size); 23 24 CRYPTO_EXPORT 25 std::vector<uint8_t> HkdfSha256(base::span<const uint8_t> secret, 26 base::span<const uint8_t> salt, 27 base::span<const uint8_t> info, 28 size_t derived_key_size); 29 30 } // namespace crypto 31 32 #endif // CRYPTO_HKDF_H_ 33