UNPKG

@cumulus/aws-client

Version:
30 lines 1.05 kB
/** * @module KMS */ import { CreateKeyCommandInput } from '@aws-sdk/client-kms'; /** * Create a KMS key * * See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html#createKey-property * for allowed params and return value. * * @param {Object} params * @returns {Promise<Object>} */ export declare const createKey: (params?: CreateKeyCommandInput) => Promise<import("@aws-sdk/client-kms").CreateKeyCommandOutput>; /** * Encrypt a string using KMS * * @param {string} KeyId - the KMS key to use for encryption * @param {string} Plaintext - the string to be encrypted * @returns {Promise<string>} the Base 64 encoding of the encrypted value */ export declare const encrypt: (KeyId: string, Plaintext: string) => Promise<string>; /** * Decrypt a KMS-encrypted string, Base 64 encoded * * @param {string} ciphertext - a KMS-encrypted value, Base 64 encoded * @returns {string} the plaintext */ export declare const decryptBase64String: (ciphertext: string) => Promise<string | undefined>; //# sourceMappingURL=KMS.d.ts.map