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 #include <vector> 13 14 #include "base/containers/span.h" 15 #include "crypto/crypto_export.h" 16 17 namespace crypto { 18 19 CRYPTO_EXPORT 20 std::string HkdfSha256(std::string_view secret, 21 std::string_view salt, 22 std::string_view info, 23 size_t derived_key_size); 24 25 CRYPTO_EXPORT 26 std::vector<uint8_t> HkdfSha256(base::span<const uint8_t> secret, 27 base::span<const uint8_t> salt, 28 base::span<const uint8_t> info, 29 size_t derived_key_size); 30 31 } // namespace crypto 32 33 #endif // CRYPTO_HKDF_H_ 34