Page MenuHomePhabricator

[web] Add Flow types for WebCrypto / SubtleCrypto
AbandonedPublic

Authored by bartek on Mar 9 2023, 10:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 16, 9:47 AM
Unknown Object (File)
Sat, May 11, 1:57 PM
Unknown Object (File)
Sat, May 11, 1:57 PM
Unknown Object (File)
Sat, May 4, 10:19 PM
Unknown Object (File)
Fri, May 3, 4:33 AM
Unknown Object (File)
Tue, Apr 23, 1:49 PM
Unknown Object (File)
Apr 4 2024, 11:38 PM
Unknown Object (File)
Apr 3 2024, 7:40 AM
Subscribers

Details

Summary

The WebCrypto APIs are missing in Flow - see this GH issue: https://github.com/facebook/flow/issues/5019
There was a PR adding them but it was closed: https://github.com/facebook/flow/pull/7714

I copied the code from that PR and slightly modified it by removing TODO types
that were breaking type checks on valid code. Also made small adjustments for this
to fit types described on MDN: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto

Test Plan

Flow doesn't complain. Tested this along with my code adding AES encryption.

Diff Detail

Repository
rCOMM Comm
Branch
barthap/aes-web
Lint
No Lint Coverage
Unit
No Test Coverage