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

Side by Side Diff: Source/platform/exported/WebCryptoAlgorithm.cpp

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) 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 const WebCryptoHmacKeyGenParams* WebCryptoAlgorithm::hmacKeyGenParams() const 118 const WebCryptoHmacKeyGenParams* WebCryptoAlgorithm::hmacKeyGenParams() const
119 { 119 {
120 ASSERT(!isNull()); 120 ASSERT(!isNull());
121 if (paramsType() == WebCryptoAlgorithmParamsTypeHmacKeyGenParams) 121 if (paramsType() == WebCryptoAlgorithmParamsTypeHmacKeyGenParams)
122 return static_cast<WebCryptoHmacKeyGenParams*>(m_private->params.get()); 122 return static_cast<WebCryptoHmacKeyGenParams*>(m_private->params.get());
123 return 0; 123 return 0;
124 } 124 }
125 125
126 const WebCryptoRsaKeyGenParams* WebCryptoAlgorithm::rsaKeyGenParams() const
127 {
128 ASSERT(!isNull());
129 if (paramsType() == WebCryptoAlgorithmParamsTypeRsaKeyGenParams)
130 return static_cast<WebCryptoRsaKeyGenParams*>(m_private->params.get());
131 return 0;
132 }
133
134 const WebCryptoAesGcmParams* WebCryptoAlgorithm::aesGcmParams() const 126 const WebCryptoAesGcmParams* WebCryptoAlgorithm::aesGcmParams() const
135 { 127 {
136 ASSERT(!isNull()); 128 ASSERT(!isNull());
137 if (paramsType() == WebCryptoAlgorithmParamsTypeAesGcmParams) 129 if (paramsType() == WebCryptoAlgorithmParamsTypeAesGcmParams)
138 return static_cast<WebCryptoAesGcmParams*>(m_private->params.get()); 130 return static_cast<WebCryptoAesGcmParams*>(m_private->params.get());
139 return 0; 131 return 0;
140 } 132 }
141 133
142 const WebCryptoRsaOaepParams* WebCryptoAlgorithm::rsaOaepParams() const 134 const WebCryptoRsaOaepParams* WebCryptoAlgorithm::rsaOaepParams() const
143 { 135 {
(...skipping 23 matching lines...) Expand all
167 { 159 {
168 switch (id) { 160 switch (id) {
169 case WebCryptoAlgorithmIdSha1: 161 case WebCryptoAlgorithmIdSha1:
170 case WebCryptoAlgorithmIdSha256: 162 case WebCryptoAlgorithmIdSha256:
171 case WebCryptoAlgorithmIdSha384: 163 case WebCryptoAlgorithmIdSha384:
172 case WebCryptoAlgorithmIdSha512: 164 case WebCryptoAlgorithmIdSha512:
173 return true; 165 return true;
174 case WebCryptoAlgorithmIdAesCbc: 166 case WebCryptoAlgorithmIdAesCbc:
175 case WebCryptoAlgorithmIdHmac: 167 case WebCryptoAlgorithmIdHmac:
176 case WebCryptoAlgorithmIdRsaSsaPkcs1v1_5: 168 case WebCryptoAlgorithmIdRsaSsaPkcs1v1_5:
177 case WebCryptoAlgorithmIdRsaEsPkcs1v1_5:
178 case WebCryptoAlgorithmIdAesGcm: 169 case WebCryptoAlgorithmIdAesGcm:
179 case WebCryptoAlgorithmIdRsaOaep: 170 case WebCryptoAlgorithmIdRsaOaep:
180 case WebCryptoAlgorithmIdAesCtr: 171 case WebCryptoAlgorithmIdAesCtr:
181 case WebCryptoAlgorithmIdAesKw: 172 case WebCryptoAlgorithmIdAesKw:
182 break; 173 break;
183 } 174 }
184 return false; 175 return false;
185 } 176 }
186 177
187 void WebCryptoAlgorithm::assign(const WebCryptoAlgorithm& other) 178 void WebCryptoAlgorithm::assign(const WebCryptoAlgorithm& other)
188 { 179 {
189 m_private = other.m_private; 180 m_private = other.m_private;
190 } 181 }
191 182
192 void WebCryptoAlgorithm::reset() 183 void WebCryptoAlgorithm::reset()
193 { 184 {
194 m_private.reset(); 185 m_private.reset();
195 } 186 }
196 187
197 } // namespace blink 188 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/crypto/RsaKeyAlgorithm.cpp ('k') | Source/platform/exported/WebCryptoKeyAlgorithm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698