Skip to content

Commit

Permalink
docs: update samples to reflect proper typings (#443)
Browse files Browse the repository at this point in the history
* docs: update samples

* 🦉 Updates from OwlBot

* 🦉 Updates from OwlBot

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
sofisl and gcf-owl-bot[bot] authored Apr 20, 2021
1 parent e0d5d00 commit 600f15d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kms/decryptSymmetric.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function main(
// const locationId = 'us-east1';
// const keyRingId = 'my-key-ring';
// const keyId = 'my-key';
// Ciphertext must be either a Buffer object or a base-64 encoded string
// const ciphertext = Buffer.from('...');

// Imports the Cloud KMS library
Expand Down Expand Up @@ -63,7 +64,7 @@ async function main(
throw new Error('Decrypt: response corrupted in-transit');
}

const plaintext = decryptResponse.plaintext.toString('utf8');
const plaintext = decryptResponse.plaintext.toString();

console.log(`Plaintext: ${plaintext}`);
return plaintext;
Expand Down

0 comments on commit 600f15d

Please sign in to comment.