Implemented functions described in https://linear.app/comm/issue/ENG-388#comment-76a38890
Docs: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
Depends on D6994
Differential D7024
[web] Implement AES encryption functions bartek on Mar 9 2023, 11:05 AM. Authored by Tags None Referenced Files
Details Implemented functions described in https://linear.app/comm/issue/ENG-388#comment-76a38890 Docs: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto Depends on D6994 Unit tests will be added in next diff. In root component (or any other) I did: import * as AES from './utils/aes-crypto-module.js'; const f = async () => { const key = await AES.generateKey(); console.log('Key', key); const plaintextBytes = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); const ciphertext = await AES.encrypt(key, plaintextBytes); console.log('Ciphertext', ciphertext); const decrypted = await AES.decrypt(key, ciphertext); console.log('Decrypted', decrypted); // should be equal to plaintextBytes }; React.useEffect(() => { f(); }, []);
Diff Detail
Event TimelineComment Actions
|