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
Paths
| Differential D7024 Authored by bartek on Mar 9 2023, 11:05 AM.
Tags None Referenced Files
Details Summary 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 Test Plan 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 Timelinebartek held this revision as a draft. Herald added subscribers: tomek, ashoat. · View Herald TranscriptMar 9 2023, 11:05 AM2023-03-09 11:05:54 (UTC-8) Harbormaster completed remote builds in B17221: Diff 23587.Mar 9 2023, 11:22 AM2023-03-09 11:22:06 (UTC-8) bartek added a child revision: D7025: [web] Add unit tests for AES functions.Mar 9 2023, 11:23 AM2023-03-09 11:23:58 (UTC-8) Comment Actions
Sweet, thanks for handling this
This revision is now accepted and ready to land.Mar 10 2023, 3:29 PM2023-03-10 15:29:37 (UTC-8) bartek edited parent revisions, added: D6994: [web-db] implement types for `SubtleCrypto` module; removed: D7023: [web] Add Flow types for WebCrypto / SubtleCrypto.Mar 12 2023, 11:49 PM2023-03-12 23:49:35 (UTC-7) bartek edited the summary of this revision. (Show Details)Mar 13 2023, 3:22 AM2023-03-13 03:22:04 (UTC-7) Comment Actions
This revision is now accepted and ready to land.Mar 13 2023, 5:21 AM2023-03-13 05:21:55 (UTC-7) Harbormaster failed remote builds in B17288: Diff 23677!Mar 13 2023, 5:32 AM2023-03-13 05:32:07 (UTC-7) Harbormaster completed remote builds in B17288: Diff 23677.Mar 13 2023, 9:49 AM2023-03-13 09:49:50 (UTC-7) Harbormaster completed remote builds in B17403: Diff 23845.Mar 20 2023, 7:15 AM2023-03-20 07:15:32 (UTC-7) Closed by commit rCOMM0a9f3ff4fc9d: [web] Implement AES encryption functions (authored by bartek). · Explain WhyMar 20 2023, 7:30 AM2023-03-20 07:30:04 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 23675 native/aestool
web/media/aes-crypto-utils.js
|