| 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 "content/child/webcrypto/webcrypto_util.h" | 5 #include "content/child/webcrypto/webcrypto_util.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "content/child/webcrypto/status.h" | 10 #include "content/child/webcrypto/status.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 case blink::WebCryptoAlgorithmIdAesCtr: | 172 case blink::WebCryptoAlgorithmIdAesCtr: |
| 173 case blink::WebCryptoAlgorithmIdAesGcm: | 173 case blink::WebCryptoAlgorithmIdAesGcm: |
| 174 *key_algorithm = blink::WebCryptoKeyAlgorithm::createAes( | 174 *key_algorithm = blink::WebCryptoKeyAlgorithm::createAes( |
| 175 algorithm.id(), keylen_bytes * 8); | 175 algorithm.id(), keylen_bytes * 8); |
| 176 return true; | 176 return true; |
| 177 default: | 177 default: |
| 178 return false; | 178 return false; |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id) { |
| 183 return alg_id == blink::WebCryptoAlgorithmIdRsaOaep || |
| 184 alg_id == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5; |
| 185 } |
| 186 |
| 182 } // namespace webcrypto | 187 } // namespace webcrypto |
| 183 | 188 |
| 184 } // namespace content | 189 } // namespace content |
| OLD | NEW |