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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 WebCryptoAlgorithmIdSha1, | 48 WebCryptoAlgorithmIdSha1, |
49 WebCryptoAlgorithmIdSha224, // FIXME: Delete once no longer referenced by ch
romium. | 49 WebCryptoAlgorithmIdSha224, // FIXME: Delete once no longer referenced by ch
romium. |
50 WebCryptoAlgorithmIdSha256, | 50 WebCryptoAlgorithmIdSha256, |
51 WebCryptoAlgorithmIdSha384, | 51 WebCryptoAlgorithmIdSha384, |
52 WebCryptoAlgorithmIdSha512, | 52 WebCryptoAlgorithmIdSha512, |
53 WebCryptoAlgorithmIdAesGcm, | 53 WebCryptoAlgorithmIdAesGcm, |
54 WebCryptoAlgorithmIdRsaOaep, | 54 WebCryptoAlgorithmIdRsaOaep, |
55 WebCryptoAlgorithmIdAesCtr, | 55 WebCryptoAlgorithmIdAesCtr, |
56 WebCryptoAlgorithmIdAesKw, | 56 WebCryptoAlgorithmIdAesKw, |
57 #if INSIDE_BLINK | 57 #if INSIDE_BLINK |
58 NumberOfWebCryptoAlgorithmId, | 58 WebCryptoAlgorithmIdLast = WebCryptoAlgorithmIdAesKw, |
59 #endif | 59 #endif |
60 }; | 60 }; |
61 | 61 |
62 enum WebCryptoAlgorithmParamsType { | 62 enum WebCryptoAlgorithmParamsType { |
63 WebCryptoAlgorithmParamsTypeNone, | 63 WebCryptoAlgorithmParamsTypeNone, |
64 WebCryptoAlgorithmParamsTypeAesCbcParams, | 64 WebCryptoAlgorithmParamsTypeAesCbcParams, |
65 WebCryptoAlgorithmParamsTypeAesKeyGenParams, | 65 WebCryptoAlgorithmParamsTypeAesKeyGenParams, |
66 WebCryptoAlgorithmParamsTypeHmacImportParams, | 66 WebCryptoAlgorithmParamsTypeHmacImportParams, |
67 WebCryptoAlgorithmParamsTypeHmacKeyGenParams, | 67 WebCryptoAlgorithmParamsTypeHmacKeyGenParams, |
68 WebCryptoAlgorithmParamsTypeRsaKeyGenParams, | 68 WebCryptoAlgorithmParamsTypeRsaKeyGenParams, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 BLINK_PLATFORM_EXPORT const WebCryptoAesKeyGenParams* aesKeyGenParams() cons
t; | 125 BLINK_PLATFORM_EXPORT const WebCryptoAesKeyGenParams* aesKeyGenParams() cons
t; |
126 BLINK_PLATFORM_EXPORT const WebCryptoHmacImportParams* hmacImportParams() co
nst; | 126 BLINK_PLATFORM_EXPORT const WebCryptoHmacImportParams* hmacImportParams() co
nst; |
127 BLINK_PLATFORM_EXPORT const WebCryptoHmacKeyGenParams* hmacKeyGenParams() co
nst; | 127 BLINK_PLATFORM_EXPORT const WebCryptoHmacKeyGenParams* hmacKeyGenParams() co
nst; |
128 BLINK_PLATFORM_EXPORT const WebCryptoRsaKeyGenParams* rsaKeyGenParams() cons
t; | 128 BLINK_PLATFORM_EXPORT const WebCryptoRsaKeyGenParams* rsaKeyGenParams() cons
t; |
129 BLINK_PLATFORM_EXPORT const WebCryptoAesGcmParams* aesGcmParams() const; | 129 BLINK_PLATFORM_EXPORT const WebCryptoAesGcmParams* aesGcmParams() const; |
130 BLINK_PLATFORM_EXPORT const WebCryptoRsaOaepParams* rsaOaepParams() const; | 130 BLINK_PLATFORM_EXPORT const WebCryptoRsaOaepParams* rsaOaepParams() const; |
131 BLINK_PLATFORM_EXPORT const WebCryptoAesCtrParams* aesCtrParams() const; | 131 BLINK_PLATFORM_EXPORT const WebCryptoAesCtrParams* aesCtrParams() const; |
132 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedImportParams* rsaHashedImportP
arams() const; | 132 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedImportParams* rsaHashedImportP
arams() const; |
133 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGenP
arams() const; | 133 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGenP
arams() const; |
134 | 134 |
| 135 // Returns true if the provided algorithm ID is for a hash (in other words,
SHA-*) |
| 136 BLINK_PLATFORM_EXPORT static bool isHash(WebCryptoAlgorithmId); |
| 137 |
135 private: | 138 private: |
136 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); | 139 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); |
137 BLINK_PLATFORM_EXPORT void reset(); | 140 BLINK_PLATFORM_EXPORT void reset(); |
138 | 141 |
139 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; | 142 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; |
140 }; | 143 }; |
141 | 144 |
142 } // namespace blink | 145 } // namespace blink |
143 | 146 |
144 #endif | 147 #endif |
OLD | NEW |