Page MenuHomePhabricator

[web-db] implement types for `SubtleCrypto` module
ClosedPublic

Authored by kamil on Mar 7 2023, 9:31 AM.
Tags
None
Referenced Files
F1698217: D6994.id23664.diff
Sat, May 4, 12:02 AM
F1698214: D6994.id23512.diff
Sat, May 4, 12:02 AM
F1698183: D6994.id23601.diff
Fri, May 3, 11:59 PM
F1697522: D6994.id.diff
Fri, May 3, 6:40 PM
Unknown Object (File)
Fri, May 3, 2:53 PM
Unknown Object (File)
Fri, May 3, 1:21 PM
Unknown Object (File)
Mon, Apr 29, 9:02 AM
Unknown Object (File)
Thu, Apr 25, 5:32 AM
Subscribers

Details

Summary

There are no build in flow types for SubtleCrypto or any implementation we can use.

Adding types based on API docs and typescript.

Test Plan

N/A

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Mar 7 2023, 10:08 AM
web/database/utils/crypto-types.js
138–263 ↗(On Diff #23512)

Why aren't these ones read-only?

268–269 ↗(On Diff #23512)

Why aren't these ones read-only?

web/database/utils/crypto-types.js
4 ↗(On Diff #23512)

Can this be read-only?

improve types and move to flow-typed

kamil added a subscriber: bartek.

Previous types were too general (string instead of current algorithm names). I've updated this to be more precise (like D7023) but with specific types for the entire module - not only AES algorithms.

Checked if it works with D7024 (cc. @bartek).

LGTM, Works with my changes. Thank you for taking care of this!

This revision is now accepted and ready to land.Mar 12 2023, 11:48 PM