OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 virtual void setAlgorithm(const char*, const WebCryptoAlgorithm&) = 0; | 48 virtual void setAlgorithm(const char*, const WebCryptoAlgorithm&) = 0; |
49 virtual void setUint8Array(const char*, const WebVector<unsigned char>&) = 0 ; | 49 virtual void setUint8Array(const char*, const WebVector<unsigned char>&) = 0 ; |
50 }; | 50 }; |
51 | 51 |
52 enum WebCryptoKeyAlgorithmParamsType { | 52 enum WebCryptoKeyAlgorithmParamsType { |
53 WebCryptoKeyAlgorithmParamsTypeNone, | 53 WebCryptoKeyAlgorithmParamsTypeNone, |
54 WebCryptoKeyAlgorithmParamsTypeHmac, | 54 WebCryptoKeyAlgorithmParamsTypeHmac, |
55 WebCryptoKeyAlgorithmParamsTypeAes, | 55 WebCryptoKeyAlgorithmParamsTypeAes, |
56 WebCryptoKeyAlgorithmParamsTypeRsaHashed, | 56 WebCryptoKeyAlgorithmParamsTypeRsaHashed, |
57 WebCryptoKeyAlgorithmParamsTypeEc, | 57 WebCryptoKeyAlgorithmParamsTypeEc, |
58 WebCryptoKeyAlgorithmParamsTypeKdf, | |
eroman
2015/01/07 00:40:31
Same comment as earlier.
nharper
2015/01/08 00:58:40
Done.
| |
58 }; | 59 }; |
59 | 60 |
60 class WebCryptoKeyAlgorithmParams { | 61 class WebCryptoKeyAlgorithmParams { |
61 public: | 62 public: |
62 virtual ~WebCryptoKeyAlgorithmParams() { } | 63 virtual ~WebCryptoKeyAlgorithmParams() { } |
63 virtual WebCryptoKeyAlgorithmParamsType type() const | 64 virtual WebCryptoKeyAlgorithmParamsType type() const |
64 { | 65 { |
65 return WebCryptoKeyAlgorithmParamsTypeNone; | 66 return WebCryptoKeyAlgorithmParamsTypeNone; |
66 } | 67 } |
67 | 68 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 case WebCryptoNamedCurveP521: | 200 case WebCryptoNamedCurveP521: |
200 dict->setString("namedCurve", "P-521"); | 201 dict->setString("namedCurve", "P-521"); |
201 break; | 202 break; |
202 } | 203 } |
203 } | 204 } |
204 | 205 |
205 private: | 206 private: |
206 const WebCryptoNamedCurve m_namedCurve; | 207 const WebCryptoNamedCurve m_namedCurve; |
207 }; | 208 }; |
208 | 209 |
210 class WebCryptoKdfKeyAlgorithmParams : public WebCryptoKeyAlgorithmParams { | |
eroman
2015/01/07 00:40:31
Same comment as earlier. I don't think there is va
nharper
2015/01/08 00:58:39
Done.
| |
211 public: | |
212 virtual WebCryptoKeyAlgorithmParamsType type() const | |
213 { | |
214 return WebCryptoKeyAlgorithmParamsTypeKdf; | |
215 } | |
216 | |
217 virtual void writeToDictionary(WebCryptoKeyAlgorithmDictionary* dict) const | |
218 { | |
219 return; | |
220 } | |
221 }; | |
222 | |
209 } // namespace blink | 223 } // namespace blink |
210 | 224 |
211 #endif | 225 #endif |
OLD | NEW |