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

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

Issue 284973002: [webcrypto] Remove RSA-ES support (3 of 3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Placate compiler warning on android about uninitialized variable Created 6 years, 7 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 | Annotate | Revision Log
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 #if INSIDE_BLINK 55 #if INSIDE_BLINK
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 createRsa(WebCryptoAlgori thmId, unsigned modulusLengthBits, const unsigned char* publicExponent, unsigned publicExponentSize);
65 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);
66 65
67 ~WebCryptoKeyAlgorithm() { reset(); } 66 ~WebCryptoKeyAlgorithm() { reset(); }
68 67
69 WebCryptoKeyAlgorithm(const WebCryptoKeyAlgorithm& other) { assign(other); } 68 WebCryptoKeyAlgorithm(const WebCryptoKeyAlgorithm& other) { assign(other); }
70 WebCryptoKeyAlgorithm& operator=(const WebCryptoKeyAlgorithm& other) 69 WebCryptoKeyAlgorithm& operator=(const WebCryptoKeyAlgorithm& other)
71 { 70 {
72 assign(other); 71 assign(other);
73 return *this; 72 return *this;
74 } 73 }
75 74
76 BLINK_PLATFORM_EXPORT bool isNull() const; 75 BLINK_PLATFORM_EXPORT bool isNull() const;
77 76
78 BLINK_PLATFORM_EXPORT WebCryptoAlgorithmId id() const; 77 BLINK_PLATFORM_EXPORT WebCryptoAlgorithmId id() const;
79 78
80 BLINK_PLATFORM_EXPORT WebCryptoKeyAlgorithmParamsType paramsType() const; 79 BLINK_PLATFORM_EXPORT WebCryptoKeyAlgorithmParamsType paramsType() const;
81 80
82 // Returns the type-specific parameters for this key. If the requested 81 // Returns the type-specific parameters for this key. If the requested
83 // parameters are not applicable (for instance an HMAC key does not have 82 // parameters are not applicable (for instance an HMAC key does not have
84 // any AES parameters) then returns 0. 83 // any AES parameters) then returns 0.
85 BLINK_PLATFORM_EXPORT WebCryptoAesKeyAlgorithmParams* aesParams() const; 84 BLINK_PLATFORM_EXPORT WebCryptoAesKeyAlgorithmParams* aesParams() const;
86 BLINK_PLATFORM_EXPORT WebCryptoHmacKeyAlgorithmParams* hmacParams() const; 85 BLINK_PLATFORM_EXPORT WebCryptoHmacKeyAlgorithmParams* hmacParams() const;
87 BLINK_PLATFORM_EXPORT WebCryptoRsaKeyAlgorithmParams* rsaParams() const;
88 BLINK_PLATFORM_EXPORT WebCryptoRsaHashedKeyAlgorithmParams* rsaHashedParams( ) const; 86 BLINK_PLATFORM_EXPORT WebCryptoRsaHashedKeyAlgorithmParams* rsaHashedParams( ) const;
89 87
90 private: 88 private:
91 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKeyAlgorithm& other); 89 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKeyAlgorithm& other);
92 BLINK_PLATFORM_EXPORT void reset(); 90 BLINK_PLATFORM_EXPORT void reset();
93 91
94 WebPrivatePtr<WebCryptoKeyAlgorithmPrivate> m_private; 92 WebPrivatePtr<WebCryptoKeyAlgorithmPrivate> m_private;
95 }; 93 };
96 94
97 } // namespace blink 95 } // namespace blink
98 96
99 #endif 97 #endif
OLDNEW
« no previous file with comments | « public/platform/WebCryptoAlgorithmParams.h ('k') | public/platform/WebCryptoKeyAlgorithmParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698