I'm trying to use WebCrypto to sign a token with RSA-PSS, but I keep getting the error:  DataError: Data provided to an operation does not meet requirements   at crypto.subtle.importKey.  This is my JavaScript code:  function signToken(token, key...
I've managed to encrypt some data with AES-GCM using IE 11 on Windows 10 but I can't get decryption to work. Example encryption JS code:  let plainText = new Uint8Array([1]); let key; let keyBuf = window.msCrypto.getRandomValues(new Uint8Arra...
I have the following code to test WebCrypto API. It works in Firefox and Chrome and I am trying to make it work in Safari.    function ab2str(buf) {       return String.fromCharCode.apply(null, new Uint16Array(buf));     }  //converts a forge 0.6.x s...
I want to use Web Cryptography API on an already existing project.  To encrypt and decrypt something I have to use an CryptoKey, but when I save to CryptoKey into localStorage it only saves the String (CryptoKey) instead of the object.  Is it possibl...
IE11's Web Crypto is located inside of window.msCrypto, whereas for Firefox or Chrome, it's accessible in window.crypto.  Web Workers do not have access to the window context but, thankfully, Chrome and Firefox also expose the crypto variable...
I would like to call methods of SubtleCrypto from a worker. Usually, it is possible via the Crypto.subtle properties available in a window context :   Eg: window.crypto.subtle.encrypt()  In a worker, window is not available, but crypto can still be a...
I would like to be able to sign data on the browser using 100% JavaScript and cryptographic token based keys.  From what I have seen so far, all old implementations of this functionality are being discontinued (e.g. even new ActiveXObject("CAPICO...
I am using WebCrypto with RSASSA-PKCS1-v1_5 (https://github.com/diafygi/webcrypto-examples#rsassa-pkcs1-v1_5---sign) and I need to export the public key to PEM format using javascript code.  The documentation says that is possible to export the key i...
I was wondering how do I solve this problem. I generate RSA-OAEP keypair using WebCrypto API, then I export private key in pkcs8 from the keypair which exports as ArrayBuffer and I want to encode this ArrayBuffer into base64 so I can store it as a PE...
Suppose I wanted to add client-side encryption to a web application using the JavaScript Web Crypto API. The client side of my application would encrypt each user's data using their key before sending the encrypted data to the server, and decrypt...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.