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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 WebCryptoAlgorithmIdAesKw, | 56 WebCryptoAlgorithmIdAesKw, |
57 #if INSIDE_BLINK | 57 #if INSIDE_BLINK |
58 NumberOfWebCryptoAlgorithmId, | 58 NumberOfWebCryptoAlgorithmId, |
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 WebCryptoAlgorithmParamsTypeHmacParams, | 66 WebCryptoAlgorithmParamsTypeHmacImportParams, |
67 WebCryptoAlgorithmParamsTypeHmacKeyParams, | 67 WebCryptoAlgorithmParamsTypeHmacKeyGenParams, |
68 WebCryptoAlgorithmParamsTypeRsaSsaParams, | |
69 WebCryptoAlgorithmParamsTypeRsaKeyGenParams, | 68 WebCryptoAlgorithmParamsTypeRsaKeyGenParams, |
| 69 WebCryptoAlgorithmParamsTypeRsaHashedKeyGenParams, |
| 70 WebCryptoAlgorithmParamsTypeRsaHashedImportParams, |
70 WebCryptoAlgorithmParamsTypeAesGcmParams, | 71 WebCryptoAlgorithmParamsTypeAesGcmParams, |
71 WebCryptoAlgorithmParamsTypeRsaOaepParams, | 72 WebCryptoAlgorithmParamsTypeRsaOaepParams, |
72 WebCryptoAlgorithmParamsTypeAesCtrParams, | 73 WebCryptoAlgorithmParamsTypeAesCtrParams, |
73 }; | 74 }; |
74 | 75 |
75 class WebCryptoAesCbcParams; | 76 class WebCryptoAesCbcParams; |
76 class WebCryptoAesKeyGenParams; | 77 class WebCryptoAesKeyGenParams; |
77 class WebCryptoHmacParams; | 78 class WebCryptoHmacImportParams; |
78 class WebCryptoHmacKeyParams; | 79 class WebCryptoHmacKeyGenParams; |
79 class WebCryptoRsaSsaParams; | |
80 class WebCryptoRsaKeyGenParams; | 80 class WebCryptoRsaKeyGenParams; |
81 class WebCryptoAesGcmParams; | 81 class WebCryptoAesGcmParams; |
82 class WebCryptoRsaOaepParams; | 82 class WebCryptoRsaOaepParams; |
83 class WebCryptoAesCtrParams; | 83 class WebCryptoAesCtrParams; |
| 84 class WebCryptoRsaHashedKeyGenParams; |
| 85 class WebCryptoRsaHashedImportParams; |
84 | 86 |
85 class WebCryptoAlgorithmParams; | 87 class WebCryptoAlgorithmParams; |
86 class WebCryptoAlgorithmPrivate; | 88 class WebCryptoAlgorithmPrivate; |
87 | 89 |
88 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters. | 90 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters. |
89 // * Immutable | 91 // * Immutable |
90 // * Threadsafe | 92 // * Threadsafe |
91 // * Copiable (cheaply) | 93 // * Copiable (cheaply) |
92 // | 94 // |
93 // If WebCryptoAlgorithm "isNull()" then it is invalid to call any of the other | 95 // If WebCryptoAlgorithm "isNull()" then it is invalid to call any of the other |
(...skipping 20 matching lines...) Expand all Loading... |
114 BLINK_PLATFORM_EXPORT bool isNull() const; | 116 BLINK_PLATFORM_EXPORT bool isNull() const; |
115 | 117 |
116 BLINK_PLATFORM_EXPORT WebCryptoAlgorithmId id() const; | 118 BLINK_PLATFORM_EXPORT WebCryptoAlgorithmId id() const; |
117 | 119 |
118 BLINK_PLATFORM_EXPORT WebCryptoAlgorithmParamsType paramsType() const; | 120 BLINK_PLATFORM_EXPORT WebCryptoAlgorithmParamsType paramsType() const; |
119 | 121 |
120 // Retrieves the type-specific parameters. The algorithm contains at most 1 | 122 // Retrieves the type-specific parameters. The algorithm contains at most 1 |
121 // type of parameters. Retrieving an invalid parameter will return 0. | 123 // type of parameters. Retrieving an invalid parameter will return 0. |
122 BLINK_PLATFORM_EXPORT const WebCryptoAesCbcParams* aesCbcParams() const; | 124 BLINK_PLATFORM_EXPORT const WebCryptoAesCbcParams* aesCbcParams() const; |
123 BLINK_PLATFORM_EXPORT const WebCryptoAesKeyGenParams* aesKeyGenParams() cons
t; | 125 BLINK_PLATFORM_EXPORT const WebCryptoAesKeyGenParams* aesKeyGenParams() cons
t; |
124 BLINK_PLATFORM_EXPORT const WebCryptoHmacParams* hmacParams() const; | 126 BLINK_PLATFORM_EXPORT const WebCryptoHmacImportParams* hmacImportParams() co
nst; |
125 BLINK_PLATFORM_EXPORT const WebCryptoHmacKeyParams* hmacKeyParams() const; | 127 BLINK_PLATFORM_EXPORT const WebCryptoHmacKeyGenParams* hmacKeyGenParams() co
nst; |
126 BLINK_PLATFORM_EXPORT const WebCryptoRsaSsaParams* rsaSsaParams() const; | |
127 BLINK_PLATFORM_EXPORT const WebCryptoRsaKeyGenParams* rsaKeyGenParams() cons
t; | 128 BLINK_PLATFORM_EXPORT const WebCryptoRsaKeyGenParams* rsaKeyGenParams() cons
t; |
128 BLINK_PLATFORM_EXPORT const WebCryptoAesGcmParams* aesGcmParams() const; | 129 BLINK_PLATFORM_EXPORT const WebCryptoAesGcmParams* aesGcmParams() const; |
129 BLINK_PLATFORM_EXPORT const WebCryptoRsaOaepParams* rsaOaepParams() const; | 130 BLINK_PLATFORM_EXPORT const WebCryptoRsaOaepParams* rsaOaepParams() const; |
130 BLINK_PLATFORM_EXPORT const WebCryptoAesCtrParams* aesCtrParams() const; | 131 BLINK_PLATFORM_EXPORT const WebCryptoAesCtrParams* aesCtrParams() const; |
| 132 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedImportParams* rsaHashedImportP
arams() const; |
| 133 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGenP
arams() const; |
131 | 134 |
132 private: | 135 private: |
133 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); | 136 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); |
134 BLINK_PLATFORM_EXPORT void reset(); | 137 BLINK_PLATFORM_EXPORT void reset(); |
135 | 138 |
136 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; | 139 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; |
137 }; | 140 }; |
138 | 141 |
139 } // namespace blink | 142 } // namespace blink |
140 | 143 |
141 #endif | 144 #endif |
OLD | NEW |