MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / parseHash

Function parseHash

packages/core/wgc/crypto/SubtleCrypto.ts:23–36  ·  view source on GitHub ↗
(hash: Hash)

Source from the content-addressed store, hash-verified

21declare const NSCCrypto;
22
23function parseHash(hash: Hash): number | null {
24 switch (hash) {
25 case 'SHA-1':
26 return 0;
27 case 'SHA-256':
28 return 1;
29 case 'SHA-384':
30 return 2;
31 case 'SHA-512':
32 return 3;
33 default:
34 return null;
35 }
36}
37
38function parseUsages(usages: KeyUsages[]) {
39 const ret = NSMutableArray.new();

Callers 5

encryptMethod · 0.85
decryptMethod · 0.85
signMethod · 0.85
verifyMethod · 0.85
generateKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected