Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function kmsRegionalDiscoveryExcludeTest (ciphertext: string|Buffer) {
const discovery = true
// This provider will decrypt for keys in any region except us-east-1.
const clientProvider = excludeRegions(['us-east-1'], getKmsClient)
const keyring = new KmsKeyringNode({ clientProvider, discovery })
const cleartext = await decrypt(keyring, ciphertext)
return { ciphertext, cleartext }
}