| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <openssl/err.h> | |
| 6 #include <openssl/hkdf.h> | |
| 7 #include <stdint.h> | 5 #include <stdint.h> |
| 8 | 6 |
| 9 #include "base/logging.h" | 7 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 11 #include "components/webcrypto/algorithm_implementation.h" | 9 #include "components/webcrypto/algorithm_implementation.h" |
| 12 #include "components/webcrypto/algorithms/secret_key_util.h" | 10 #include "components/webcrypto/algorithms/secret_key_util.h" |
| 13 #include "components/webcrypto/algorithms/util.h" | 11 #include "components/webcrypto/algorithms/util.h" |
| 14 #include "components/webcrypto/blink_key_handle.h" | 12 #include "components/webcrypto/blink_key_handle.h" |
| 15 #include "components/webcrypto/crypto_data.h" | 13 #include "components/webcrypto/crypto_data.h" |
| 16 #include "components/webcrypto/status.h" | 14 #include "components/webcrypto/status.h" |
| 17 #include "crypto/openssl_util.h" | 15 #include "crypto/openssl_util.h" |
| 18 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 16 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
| 19 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" | 17 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" |
| 18 #include "third_party/boringssl/src/include/openssl/err.h" |
| 19 #include "third_party/boringssl/src/include/openssl/hkdf.h" |
| 20 | 20 |
| 21 namespace webcrypto { | 21 namespace webcrypto { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const blink::WebCryptoKeyUsageMask kValidUsages = | 25 const blink::WebCryptoKeyUsageMask kValidUsages = |
| 26 blink::WebCryptoKeyUsageDeriveKey | blink::WebCryptoKeyUsageDeriveBits; | 26 blink::WebCryptoKeyUsageDeriveKey | blink::WebCryptoKeyUsageDeriveBits; |
| 27 | 27 |
| 28 class HkdfImplementation : public AlgorithmImplementation { | 28 class HkdfImplementation : public AlgorithmImplementation { |
| 29 public: | 29 public: |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 std::unique_ptr<AlgorithmImplementation> CreateHkdfImplementation() { | 126 std::unique_ptr<AlgorithmImplementation> CreateHkdfImplementation() { |
| 127 return base::WrapUnique(new HkdfImplementation); | 127 return base::WrapUnique(new HkdfImplementation); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace webcrypto | 130 } // namespace webcrypto |
| OLD | NEW |