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

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

Issue 789733009: Implement HKDF for WebCrypto (blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move ASSERT(), add break Created 5 years, 11 months 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
« no previous file with comments | « public/platform/WebCryptoAlgorithmParams.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 BLINK_PLATFORM_EXPORT WebCryptoKeyAlgorithm(WebCryptoAlgorithmId, PassOwnPtr <WebCryptoKeyAlgorithmParams>); 56 BLINK_PLATFORM_EXPORT WebCryptoKeyAlgorithm(WebCryptoAlgorithmId, PassOwnPtr <WebCryptoKeyAlgorithmParams>);
57 #endif 57 #endif
58 58
59 // FIXME: Delete this in favor of the create*() functions. 59 // FIXME: Delete this in favor of the create*() functions.
60 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm adoptParamsAndCreate(WebC ryptoAlgorithmId, WebCryptoKeyAlgorithmParams*); 60 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm adoptParamsAndCreate(WebC ryptoAlgorithmId, WebCryptoKeyAlgorithmParams*);
61 61
62 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createAes(WebCryptoAlgori thmId, unsigned short keyLengthBits); 62 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createAes(WebCryptoAlgori thmId, unsigned short keyLengthBits);
63 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createHmac(WebCryptoAlgor ithmId hash, unsigned keyLengthBits); 63 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createHmac(WebCryptoAlgor ithmId hash, unsigned keyLengthBits);
64 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createRsaHashed(WebCrypto AlgorithmId, unsigned modulusLengthBits, const unsigned char* publicExponent, un signed publicExponentSize, WebCryptoAlgorithmId hash); 64 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createRsaHashed(WebCrypto AlgorithmId, unsigned modulusLengthBits, const unsigned char* publicExponent, un signed publicExponentSize, WebCryptoAlgorithmId hash);
65 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createEc(WebCryptoAlgorit hmId, WebCryptoNamedCurve); 65 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createEc(WebCryptoAlgorit hmId, WebCryptoNamedCurve);
66 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createWithoutParams(WebCr yptoAlgorithmId);
66 67
67 ~WebCryptoKeyAlgorithm() { reset(); } 68 ~WebCryptoKeyAlgorithm() { reset(); }
68 69
69 WebCryptoKeyAlgorithm(const WebCryptoKeyAlgorithm& other) { assign(other); } 70 WebCryptoKeyAlgorithm(const WebCryptoKeyAlgorithm& other) { assign(other); }
70 WebCryptoKeyAlgorithm& operator=(const WebCryptoKeyAlgorithm& other) 71 WebCryptoKeyAlgorithm& operator=(const WebCryptoKeyAlgorithm& other)
71 { 72 {
72 assign(other); 73 assign(other);
73 return *this; 74 return *this;
74 } 75 }
75 76
(...skipping 17 matching lines...) Expand all
93 private: 94 private:
94 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKeyAlgorithm& other); 95 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKeyAlgorithm& other);
95 BLINK_PLATFORM_EXPORT void reset(); 96 BLINK_PLATFORM_EXPORT void reset();
96 97
97 WebPrivatePtr<WebCryptoKeyAlgorithmPrivate> m_private; 98 WebPrivatePtr<WebCryptoKeyAlgorithmPrivate> m_private;
98 }; 99 };
99 100
100 } // namespace blink 101 } // namespace blink
101 102
102 #endif 103 #endif
OLDNEW
« no previous file with comments | « public/platform/WebCryptoAlgorithmParams.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698