| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/evp.h> | 5 #include <openssl/evp.h> |
| 6 #include <openssl/sha.h> | 6 #include <openssl/sha.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // digest, so none of the subsequent errors are spec compliant. | 118 // digest, so none of the subsequent errors are spec compliant. |
| 119 if (!error.IsSuccess()) | 119 if (!error.IsSuccess()) |
| 120 return error; | 120 return error; |
| 121 return digestor.FinishWithVectorAndStatus(buffer); | 121 return digestor.FinishWithVectorAndStatus(buffer); |
| 122 } | 122 } |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace | 125 } // namespace |
| 126 | 126 |
| 127 std::unique_ptr<AlgorithmImplementation> CreateShaImplementation() { | 127 std::unique_ptr<AlgorithmImplementation> CreateShaImplementation() { |
| 128 return base::WrapUnique(new ShaImplementation()); | 128 return base::MakeUnique<ShaImplementation>(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 std::unique_ptr<blink::WebCryptoDigestor> CreateDigestorImplementation( | 131 std::unique_ptr<blink::WebCryptoDigestor> CreateDigestorImplementation( |
| 132 blink::WebCryptoAlgorithmId algorithm) { | 132 blink::WebCryptoAlgorithmId algorithm) { |
| 133 return std::unique_ptr<blink::WebCryptoDigestor>(new DigestorImpl(algorithm)); | 133 return std::unique_ptr<blink::WebCryptoDigestor>(new DigestorImpl(algorithm)); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace webcrypto | 136 } // namespace webcrypto |
| OLD | NEW |