Chromium Code Reviews| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 virtual void verifySignature(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* signature, unsigned signatureSize, const unsigned char* da ta, unsigned dataSize, WebCryptoResult result) { result.completeWithError(); } | 171 virtual void verifySignature(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* signature, unsigned signatureSize, const unsigned char* da ta, unsigned dataSize, WebCryptoResult result) { result.completeWithError(); } |
| 172 virtual void digest(const WebCryptoAlgorithm&, const unsigned char* data, un signed dataSize, WebCryptoResult result) { result.completeWithError(); } | 172 virtual void digest(const WebCryptoAlgorithm&, const unsigned char* data, un signed dataSize, WebCryptoResult result) { result.completeWithError(); } |
| 173 virtual void generateKey(const WebCryptoAlgorithm&, bool extractable, WebCry ptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(); } | 173 virtual void generateKey(const WebCryptoAlgorithm&, bool extractable, WebCry ptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(); } |
| 174 // It is possible for the WebCryptoAlgorithm to be "isNull()" | 174 // It is possible for the WebCryptoAlgorithm to be "isNull()" |
| 175 virtual void importKey(WebCryptoKeyFormat, const unsigned char* keyData, uns igned keyDataSize, const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsag eMask, WebCryptoResult result) { result.completeWithError(); } | 175 virtual void importKey(WebCryptoKeyFormat, const unsigned char* keyData, uns igned keyDataSize, const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsag eMask, WebCryptoResult result) { result.completeWithError(); } |
| 176 virtual void exportKey(WebCryptoKeyFormat, const WebCryptoKey&, WebCryptoRes ult result) { result.completeWithError(); } | 176 virtual void exportKey(WebCryptoKeyFormat, const WebCryptoKey&, WebCryptoRes ult result) { result.completeWithError(); } |
| 177 virtual void wrapKey(WebCryptoKeyFormat, const WebCryptoKey& key, const WebC ryptoKey& wrappingKey, const WebCryptoAlgorithm&, WebCryptoResult result) { resu lt.completeWithError(); } | 177 virtual void wrapKey(WebCryptoKeyFormat, const WebCryptoKey& key, const WebC ryptoKey& wrappingKey, const WebCryptoAlgorithm&, WebCryptoResult result) { resu lt.completeWithError(); } |
| 178 // It is possible that unwrappedKeyAlgorithm.isNull() | 178 // It is possible that unwrappedKeyAlgorithm.isNull() |
| 179 virtual void unwrapKey(WebCryptoKeyFormat, const unsigned char* wrappedKey, unsigned wrappedKeySize, const WebCryptoKey&, const WebCryptoAlgorithm& unwrapAl gorithm, const WebCryptoAlgorithm& unwrappedKeyAlgorithm, bool extractable, WebC ryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(); } | 179 virtual void unwrapKey(WebCryptoKeyFormat, const unsigned char* wrappedKey, unsigned wrappedKeySize, const WebCryptoKey&, const WebCryptoAlgorithm& unwrapAl gorithm, const WebCryptoAlgorithm& unwrappedKeyAlgorithm, bool extractable, WebC ryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(); } |
| 180 | 180 |
| 181 // This is the one exception to the "Completeing the request" guarantees | |
|
eroman
2014/02/08 00:03:40
typo completing
jww
2014/02/08 00:41:55
Done.
| |
| 182 // outlined above. digestSynchronous must provide the result synchronously. | |
| 183 // Consumers may assume that the result object will have one of its | |
| 184 // "complete" functions called before digestSynchronous returns. | |
| 185 // | |
| 186 // This is useful for Blink internal crypto and is not part of the | |
| 187 // WebCrypto standard. | |
| 188 virtual void digestSynchronous(const WebCryptoAlgorithm&, const unsigned cha r* data, unsigned dataSize, WebCryptoResult result) { result.completeWithError() ; } | |
|
eroman
2014/02/08 00:03:40
Is it going to be convenient enough having "WebCry
jww
2014/02/08 00:41:55
That works for me. I was trying to keep the API si
| |
| 189 | |
| 181 protected: | 190 protected: |
| 182 virtual ~WebCrypto() { } | 191 virtual ~WebCrypto() { } |
| 183 }; | 192 }; |
| 184 | 193 |
| 185 } // namespace blink | 194 } // namespace blink |
| 186 | 195 |
| 187 #endif | 196 #endif |
| OLD | NEW |