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 kmsRegionalDiscoveryLimitTest (ciphertext: string|Buffer) {
const discovery = true
// This provider will *only* decrypt for keys in the us-east-1 region.
const clientProvider = limitRegions(['us-east-1'], getKmsClient)
const keyring = new KmsKeyringNode({ clientProvider, discovery })
const cleartext = await decrypt(keyring, ciphertext)
return { ciphertext, cleartext }
}