UNPKG

1.27 kBTypeScriptView Raw
1export declare const encrypt: (data: Uint8Array, keyStr: string) => Promise<Uint8Array>;
2export declare const decrypt: (encrypted: Uint8Array, keyStr: string) => Promise<Uint8Array>;
3export declare const genKeyStr: () => Promise<string>;
4export declare const decryptGCM: (encrypted: string, keyStr: string, ivStr: string) => Promise<string>;
5export declare const sha256: (bytes: Uint8Array) => Promise<Uint8Array>;
6export declare const rsaVerify: (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => Promise<boolean>;
7export declare const ed25519Verify: (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => Promise<boolean>;
8export declare const ksPublicReadKey: () => Promise<string>;
9export declare const ksPublicWriteKey: () => Promise<string>;
10export declare const ksDecrypt: (encrypted: string) => Promise<string>;
11export declare const ksSign: (message: string, charSize: number) => Promise<string>;
12export declare const ksImportSymmKey: (key: string, name: string) => Promise<void>;
13export declare const ksExportSymmKey: (name: string) => Promise<string>;
14export declare const ksKeyExists: (name: string) => Promise<boolean>;
15export declare const ksGetAlg: () => Promise<string>;
16export declare const ksClear: () => Promise<void>;