@river-build/sdk
Version:
For more details, visit the following resources:
15 lines • 786 B
TypeScript
import { EncryptedData } from '@river-build/proto';
export declare function uint8ArrayToBase64(uint8Array: Uint8Array): string;
export declare function base64ToUint8Array(base64: string): Uint8Array;
export declare function deriveKeyAndIV(keyPhrase: string | Uint8Array): Promise<{
key: Uint8Array;
iv: Uint8Array;
}>;
export declare function encryptAESGCM(data: Uint8Array, key?: Uint8Array, iv?: Uint8Array): Promise<{
ciphertext: Uint8Array;
iv: Uint8Array;
secretKey: Uint8Array;
}>;
export declare function decryptAESGCM(data: Uint8Array | string, key: Uint8Array, iv: Uint8Array): Promise<Uint8Array>;
export declare function decryptDerivedAESGCM(keyPhrase: string, encryptedData: EncryptedData): Promise<Uint8Array>;
//# sourceMappingURL=crypto_utils.d.ts.map