Web counterpart of D7224. It slightly differs from the native counterpart. A key difference is that we save it as a blob and generate object URL for that.
Details
- Reviewers
atul marcin kamil - Commits
- rCOMM67c0447e210d: [web] Add function to decrypt media
Called this function giving url to encrypted media. Set returned url as an image source. Confirmed the image is displayed
Diff Detail
- Repository
- rCOMM Comm
- Branch
- barthap/encrypted-media/js
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
web/media/encryption-utils.js | ||
---|---|---|
90 ↗ | (On Diff #24528) | Probably irrelevant, but what do we need time measurement for? If just for formalities then it probably doesn't matter where we put calls to Date.now() but if we want to be able to use if for profiling how fast crypto operations are we might want to put decryptStartTime declaration jut before call to AES.decrypt. On the other hand I am not sure how fast is hexToUintArray. Perhaps it is so fast it can be neglected during time measurements. |
web/media/encryption-utils.js | ||
---|---|---|
90 ↗ | (On Diff #24528) | Yeah, this is pretty general because helper steps (like hex -> uint8array) are insignificant. If the whole step takes too long, then measurements can potentially be split for in-depth insights while debugging |