| OLD | NEW |
| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual ~WebCryptoAlgorithmParams() { } | 54 virtual ~WebCryptoAlgorithmParams() { } |
| 55 | 55 |
| 56 WebCryptoAlgorithmParamsType type() const { return m_type; } | 56 WebCryptoAlgorithmParamsType type() const { return m_type; } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 WebCryptoAlgorithmParamsType m_type; | 59 WebCryptoAlgorithmParamsType m_type; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class WebCryptoAesCbcParams : public WebCryptoAlgorithmParams { | 62 class WebCryptoAesCbcParams : public WebCryptoAlgorithmParams { |
| 63 public: | 63 public: |
| 64 WebCryptoAesCbcParams(unsigned char* iv, size_t ivSize) | 64 WebCryptoAesCbcParams(unsigned char* iv, unsigned ivSize) |
| 65 : WebCryptoAlgorithmParams(WebCryptoAlgorithmParamsTypeAesCbcParams) | 65 : WebCryptoAlgorithmParams(WebCryptoAlgorithmParamsTypeAesCbcParams) |
| 66 , m_iv(iv, ivSize) | 66 , m_iv(iv, ivSize) |
| 67 { | 67 { |
| 68 } | 68 } |
| 69 | 69 |
| 70 const WebVector<unsigned char>& iv() const { return m_iv; } | 70 const WebVector<unsigned char>& iv() const { return m_iv; } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 const WebVector<unsigned char> m_iv; | 73 const WebVector<unsigned char> m_iv; |
| 74 }; | 74 }; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 const WebCryptoAlgorithm& hash() const { return m_hash; } | 140 const WebCryptoAlgorithm& hash() const { return m_hash; } |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 WebCryptoAlgorithm m_hash; | 143 WebCryptoAlgorithm m_hash; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 class WebCryptoRsaKeyGenParams : public WebCryptoAlgorithmParams { | 146 class WebCryptoRsaKeyGenParams : public WebCryptoAlgorithmParams { |
| 147 public: | 147 public: |
| 148 WebCryptoRsaKeyGenParams(unsigned modulusLength, const unsigned char* public
Exponent, size_t publicExponentSize) | 148 WebCryptoRsaKeyGenParams(unsigned modulusLength, const unsigned char* public
Exponent, unsigned publicExponentSize) |
| 149 : WebCryptoAlgorithmParams(WebCryptoAlgorithmParamsTypeRsaKeyGenParams) | 149 : WebCryptoAlgorithmParams(WebCryptoAlgorithmParamsTypeRsaKeyGenParams) |
| 150 , m_modulusLength(modulusLength) | 150 , m_modulusLength(modulusLength) |
| 151 , m_publicExponent(publicExponent, publicExponentSize) | 151 , m_publicExponent(publicExponent, publicExponentSize) |
| 152 { | 152 { |
| 153 } | 153 } |
| 154 | 154 |
| 155 unsigned modulusLength() const { return m_modulusLength; } | 155 unsigned modulusLength() const { return m_modulusLength; } |
| 156 const WebVector<unsigned char>& publicExponent() const { return m_publicExpo
nent; } | 156 const WebVector<unsigned char>& publicExponent() const { return m_publicExpo
nent; } |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 const unsigned m_modulusLength; | 159 const unsigned m_modulusLength; |
| 160 const WebVector<unsigned char> m_publicExponent; | 160 const WebVector<unsigned char> m_publicExponent; |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace WebKit | 163 } // namespace WebKit |
| 164 | 164 |
| 165 #endif | 165 #endif |
| OLD | NEW |