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