diff options
Diffstat (limited to 'chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/before.html')
-rw-r--r-- | chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/before.html | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/before.html b/chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/before.html deleted file mode 100644 index 454afd27d5c..00000000000 --- a/chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/before.html +++ /dev/null @@ -1,52 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title></title> - <script> - "use strict"; - - // Algorithm Object - var algorithmKeyGen = { - name: "RSASSA-PKCS1-v1_5", - params: { - modulusLength: 2048, - publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537 - } - }; - - var algorithmSign = { - name: "RSASSA-PKCS1-v1_5", - params: { hash: { name: "SHA-256" } } - }; - - var keyGen = this.crypto.generateKey(algorithmKeyGen, false, ["sign"]); - - keyGen.oncomplete = function(event) { - // Because we are not supplying data to .sign(), a multi-part - // CryptoOperation will be returned, which requires us to call .process() - // and .finish(). - var signer = window.crypt.sign(algorithmSign, event.target.result.privateKey); - signer.oncomplete = function(event) { - console.log("The signature is: " + event.target.result); - } - signer.onerror = function(event) { - console.error("Unable to sign"); - } - - var dataPart1 = convertPlainTextToArrayBufferView("hello,"); - var dataPart2 = convertPlainTextToArrayBufferView(" world!"); - // TODO: create example utility function that converts text -> ArrayBufferView - - signer.process(dataPart1); - signer.process(dataPart2); - signer.finish(); - }; - - keyGen.onerror = function(event) { - console.error("Unable to generate a key."); - }; - - </script> - </head> - <body></body> -</html>
\ No newline at end of file |