OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 return blink::WebCryptoKeyUsageVerify; | 104 return blink::WebCryptoKeyUsageVerify; |
105 case DeriveKey: | 105 case DeriveKey: |
106 return blink::WebCryptoKeyUsageDeriveKey; | 106 return blink::WebCryptoKeyUsageDeriveKey; |
107 case WrapKey: | 107 case WrapKey: |
108 return blink::WebCryptoKeyUsageWrapKey; | 108 return blink::WebCryptoKeyUsageWrapKey; |
109 case UnwrapKey: | 109 case UnwrapKey: |
110 return blink::WebCryptoKeyUsageUnwrapKey; | 110 return blink::WebCryptoKeyUsageUnwrapKey; |
111 case Digest: | 111 case Digest: |
112 case GenerateKey: | 112 case GenerateKey: |
113 case ImportKey: | 113 case ImportKey: |
114 case NumberOfAlgorithmOperations: | |
115 break; | 114 break; |
116 } | 115 } |
117 | 116 |
118 ASSERT_NOT_REACHED(); | 117 ASSERT_NOT_REACHED(); |
119 return 0; | 118 return 0; |
120 } | 119 } |
121 | 120 |
122 bool getHmacHashId(const blink::WebCryptoAlgorithm& algorithm, blink::WebCryptoA
lgorithmId& hashId) | 121 bool getHmacHashId(const blink::WebCryptoAlgorithm& algorithm, blink::WebCryptoA
lgorithmId& hashId) |
123 { | 122 { |
124 if (algorithm.hmacParams()) { | 123 if (algorithm.hmacParams()) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 if (!usage) { | 234 if (!usage) { |
236 exceptionState.throwTypeError("Invalid keyUsages argument"); | 235 exceptionState.throwTypeError("Invalid keyUsages argument"); |
237 return false; | 236 return false; |
238 } | 237 } |
239 mask |= usage; | 238 mask |= usage; |
240 } | 239 } |
241 return true; | 240 return true; |
242 } | 241 } |
243 | 242 |
244 } // namespace WebCore | 243 } // namespace WebCore |
OLD | NEW |