| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // * Threadsafe | 49 // * Threadsafe |
| 50 // * Copiable (cheaply) | 50 // * Copiable (cheaply) |
| 51 class WebCryptoKeyAlgorithm { | 51 class WebCryptoKeyAlgorithm { |
| 52 public: | 52 public: |
| 53 WebCryptoKeyAlgorithm() { } | 53 WebCryptoKeyAlgorithm() { } |
| 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 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm adoptParamsAndCreate(WebC
ryptoAlgorithmId, WebCryptoKeyAlgorithmParams*); | 60 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm adoptParamsAndCreate(WebC
ryptoAlgorithmId, WebCryptoKeyAlgorithmParams*); |
| 60 | 61 |
| 62 BLINK_PLATFORM_EXPORT static WebCryptoKeyAlgorithm createAes(WebCryptoAlgori
thmId, unsigned short 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); |
| 66 |
| 61 ~WebCryptoKeyAlgorithm() { reset(); } | 67 ~WebCryptoKeyAlgorithm() { reset(); } |
| 62 | 68 |
| 63 WebCryptoKeyAlgorithm(const WebCryptoKeyAlgorithm& other) { assign(other); } | 69 WebCryptoKeyAlgorithm(const WebCryptoKeyAlgorithm& other) { assign(other); } |
| 64 WebCryptoKeyAlgorithm& operator=(const WebCryptoKeyAlgorithm& other) | 70 WebCryptoKeyAlgorithm& operator=(const WebCryptoKeyAlgorithm& other) |
| 65 { | 71 { |
| 66 assign(other); | 72 assign(other); |
| 67 return *this; | 73 return *this; |
| 68 } | 74 } |
| 69 | 75 |
| 70 BLINK_PLATFORM_EXPORT bool isNull() const; | 76 BLINK_PLATFORM_EXPORT bool isNull() const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 84 private: | 90 private: |
| 85 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKeyAlgorithm& other); | 91 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKeyAlgorithm& other); |
| 86 BLINK_PLATFORM_EXPORT void reset(); | 92 BLINK_PLATFORM_EXPORT void reset(); |
| 87 | 93 |
| 88 WebPrivatePtr<WebCryptoKeyAlgorithmPrivate> m_private; | 94 WebPrivatePtr<WebCryptoKeyAlgorithmPrivate> m_private; |
| 89 }; | 95 }; |
| 90 | 96 |
| 91 } // namespace blink | 97 } // namespace blink |
| 92 | 98 |
| 93 #endif | 99 #endif |
| OLD | NEW |