Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: public/platform/WebCryptoAlgorithm.h

Issue 779723002: WebCrypto: Add parsing for the algorithm parameter AesDerivedKey. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add override Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 WebCryptoAlgorithmParamsTypeRsaHashedKeyGenParams, 93 WebCryptoAlgorithmParamsTypeRsaHashedKeyGenParams,
94 WebCryptoAlgorithmParamsTypeRsaHashedImportParams, 94 WebCryptoAlgorithmParamsTypeRsaHashedImportParams,
95 WebCryptoAlgorithmParamsTypeAesGcmParams, 95 WebCryptoAlgorithmParamsTypeAesGcmParams,
96 WebCryptoAlgorithmParamsTypeRsaOaepParams, 96 WebCryptoAlgorithmParamsTypeRsaOaepParams,
97 WebCryptoAlgorithmParamsTypeAesCtrParams, 97 WebCryptoAlgorithmParamsTypeAesCtrParams,
98 WebCryptoAlgorithmParamsTypeRsaPssParams, 98 WebCryptoAlgorithmParamsTypeRsaPssParams,
99 WebCryptoAlgorithmParamsTypeEcdsaParams, 99 WebCryptoAlgorithmParamsTypeEcdsaParams,
100 WebCryptoAlgorithmParamsTypeEcKeyGenParams, 100 WebCryptoAlgorithmParamsTypeEcKeyGenParams,
101 WebCryptoAlgorithmParamsTypeEcKeyImportParams, 101 WebCryptoAlgorithmParamsTypeEcKeyImportParams,
102 WebCryptoAlgorithmParamsTypeEcdhKeyDeriveParams, 102 WebCryptoAlgorithmParamsTypeEcdhKeyDeriveParams,
103 WebCryptoAlgorithmParamsTypeAesDerivedKeyParams,
103 }; 104 };
104 105
105 struct WebCryptoAlgorithmInfo { 106 struct WebCryptoAlgorithmInfo {
106 typedef char ParamsTypeOrUndefined; 107 typedef char ParamsTypeOrUndefined;
107 static const ParamsTypeOrUndefined Undefined = -1; 108 static const ParamsTypeOrUndefined Undefined = -1;
108 109
109 // The canonical (case-sensitive) name for the algorithm as a 110 // The canonical (case-sensitive) name for the algorithm as a
110 // null-terminated C-string literal. 111 // null-terminated C-string literal.
111 const char* name; 112 const char* name;
112 113
(...skipping 10 matching lines...) Expand all
123 class WebCryptoAesGcmParams; 124 class WebCryptoAesGcmParams;
124 class WebCryptoRsaOaepParams; 125 class WebCryptoRsaOaepParams;
125 class WebCryptoAesCtrParams; 126 class WebCryptoAesCtrParams;
126 class WebCryptoRsaHashedKeyGenParams; 127 class WebCryptoRsaHashedKeyGenParams;
127 class WebCryptoRsaHashedImportParams; 128 class WebCryptoRsaHashedImportParams;
128 class WebCryptoRsaPssParams; 129 class WebCryptoRsaPssParams;
129 class WebCryptoEcdsaParams; 130 class WebCryptoEcdsaParams;
130 class WebCryptoEcKeyGenParams; 131 class WebCryptoEcKeyGenParams;
131 class WebCryptoEcKeyImportParams; 132 class WebCryptoEcKeyImportParams;
132 class WebCryptoEcdhKeyDeriveParams; 133 class WebCryptoEcdhKeyDeriveParams;
134 class WebCryptoAesDerivedKeyParams;
133 135
134 class WebCryptoAlgorithmParams; 136 class WebCryptoAlgorithmParams;
135 class WebCryptoAlgorithmPrivate; 137 class WebCryptoAlgorithmPrivate;
136 138
137 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters. 139 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters.
138 // * Immutable 140 // * Immutable
139 // * Threadsafe 141 // * Threadsafe
140 // * Copiable (cheaply) 142 // * Copiable (cheaply)
141 // 143 //
142 // If WebCryptoAlgorithm "isNull()" then it is invalid to call any of the other 144 // If WebCryptoAlgorithm "isNull()" then it is invalid to call any of the other
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 BLINK_PLATFORM_EXPORT const WebCryptoAesGcmParams* aesGcmParams() const; 182 BLINK_PLATFORM_EXPORT const WebCryptoAesGcmParams* aesGcmParams() const;
181 BLINK_PLATFORM_EXPORT const WebCryptoRsaOaepParams* rsaOaepParams() const; 183 BLINK_PLATFORM_EXPORT const WebCryptoRsaOaepParams* rsaOaepParams() const;
182 BLINK_PLATFORM_EXPORT const WebCryptoAesCtrParams* aesCtrParams() const; 184 BLINK_PLATFORM_EXPORT const WebCryptoAesCtrParams* aesCtrParams() const;
183 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedImportParams* rsaHashedImportP arams() const; 185 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedImportParams* rsaHashedImportP arams() const;
184 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGenP arams() const; 186 BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGenP arams() const;
185 BLINK_PLATFORM_EXPORT const WebCryptoRsaPssParams* rsaPssParams() const; 187 BLINK_PLATFORM_EXPORT const WebCryptoRsaPssParams* rsaPssParams() const;
186 BLINK_PLATFORM_EXPORT const WebCryptoEcdsaParams* ecdsaParams() const; 188 BLINK_PLATFORM_EXPORT const WebCryptoEcdsaParams* ecdsaParams() const;
187 BLINK_PLATFORM_EXPORT const WebCryptoEcKeyGenParams* ecKeyGenParams() const; 189 BLINK_PLATFORM_EXPORT const WebCryptoEcKeyGenParams* ecKeyGenParams() const;
188 BLINK_PLATFORM_EXPORT const WebCryptoEcKeyImportParams* ecKeyImportParams() const; 190 BLINK_PLATFORM_EXPORT const WebCryptoEcKeyImportParams* ecKeyImportParams() const;
189 BLINK_PLATFORM_EXPORT const WebCryptoEcdhKeyDeriveParams* ecdhKeyDeriveParam s() const; 191 BLINK_PLATFORM_EXPORT const WebCryptoEcdhKeyDeriveParams* ecdhKeyDeriveParam s() const;
192 BLINK_PLATFORM_EXPORT const WebCryptoAesDerivedKeyParams* aesDerivedKeyParam s() const;
190 193
191 // Returns true if the provided algorithm ID is for a hash (in other words, SHA-*) 194 // Returns true if the provided algorithm ID is for a hash (in other words, SHA-*)
192 BLINK_PLATFORM_EXPORT static bool isHash(WebCryptoAlgorithmId); 195 BLINK_PLATFORM_EXPORT static bool isHash(WebCryptoAlgorithmId);
193 196
194 private: 197 private:
195 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); 198 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other);
196 BLINK_PLATFORM_EXPORT void reset(); 199 BLINK_PLATFORM_EXPORT void reset();
197 200
198 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; 201 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private;
199 }; 202 };
200 203
201 } // namespace blink 204 } // namespace blink
202 205
203 #endif 206 #endif
OLDNEW
« no previous file with comments | « Source/platform/exported/WebCryptoAlgorithm.cpp ('k') | public/platform/WebCryptoAlgorithmParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698