示例工程 39-secrets-safestorage

39-secrets-safestorage/app/.tsc/shared/crypto.d.ts

typescript · 0.6 KB

export type EncryptedValue = {
    ciphertext: string;
    iv: string;
    tag: string;
};
export declare function generateDataKey(): Buffer;
export declare function encryptSecret(dataKey: Buffer, plaintext: string): EncryptedValue;
export declare function decryptSecret(dataKey: Buffer, value: EncryptedValue): string;
export declare function tamperCiphertext(value: EncryptedValue): EncryptedValue;
export declare function maskSecret(value: string): string;
export declare function ciphertextBytes(value: EncryptedValue): number;
//# sourceMappingURL=crypto.d.ts.map