| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "public/platform/WebCommon.h" | 34 #include "public/platform/WebCommon.h" |
| 35 | 35 |
| 36 #include "public/platform/WebCryptoAlgorithm.h" | 36 #include "public/platform/WebCryptoAlgorithm.h" |
| 37 | 37 |
| 38 namespace v8 { | 38 namespace v8 { |
| 39 class Isolate; | 39 class Isolate; |
| 40 class Object; | 40 class Object; |
| 41 template <class T> | 41 template <class T> |
| 42 class Local; | 42 class Local; |
| 43 } | 43 } // namespace v8 |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 class WebString; | 47 class WebString; |
| 48 | 48 |
| 49 // Converts a javascript Dictionary to a WebCryptoAlgorithm object. | 49 // Converts a javascript Dictionary to a WebCryptoAlgorithm object. |
| 50 // | 50 // |
| 51 // This corresponds with "normalizing" [1] the algorithm, and then validating | 51 // This corresponds with "normalizing" [1] the algorithm, and then validating |
| 52 // the expected parameters for the algorithm/operation combination. | 52 // the expected parameters for the algorithm/operation combination. |
| 53 // | 53 // |
| 54 // On failure returns an null WebCryptoAlgorithm, sets the int to the | 54 // On failure returns an null WebCryptoAlgorithm, sets the int to the |
| 55 // ExceptionCode and the WebString to a (non-localized) debug string. | 55 // ExceptionCode and the WebString to a (non-localized) debug string. |
| 56 // | 56 // |
| 57 // [1] http://www.w3.org/TR/WebCryptoAPI/#algorithm-normalizing-rules | 57 // [1] http://www.w3.org/TR/WebCryptoAPI/#algorithm-normalizing-rules |
| 58 BLINK_EXPORT WebCryptoAlgorithm | 58 BLINK_EXPORT WebCryptoAlgorithm |
| 59 NormalizeCryptoAlgorithm(v8::Local<v8::Object>, | 59 NormalizeCryptoAlgorithm(v8::Local<v8::Object>, |
| 60 WebCryptoOperation, | 60 WebCryptoOperation, |
| 61 int* exception_code, | 61 int* exception_code, |
| 62 WebString* error_details, | 62 WebString* error_details, |
| 63 v8::Isolate*); | 63 v8::Isolate*); |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 #endif | 67 #endif |
| OLD | NEW |