Skip to content

Commit

Permalink
docs: update return type in jsdoc for Buffers (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 12, 2019
1 parent 4d5cf63 commit 18fb2c7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const CryptoKeyVersionTemplate = {
*
* The number should be among the values of [AttestationFormat]{@link google.cloud.kms.v1.AttestationFormat}
*
* @property {string} content
* @property {Buffer} content
* Output only. The attestation data provided by the HSM when the key
* operation was performed.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ const UpdateCryptoKeyVersionRequest = {
* If a CryptoKey is specified, the server
* will use its primary version.
*
* @property {string} plaintext
* @property {Buffer} plaintext
* Required. The data to encrypt. Must be no larger than 64KiB.
*
* The maximum size depends on the key version's
Expand All @@ -399,7 +399,7 @@ const UpdateCryptoKeyVersionRequest = {
* the plaintext and additional_authenticated_data fields must be no larger
* than 8KiB.
*
* @property {string} additionalAuthenticatedData
* @property {Buffer} additionalAuthenticatedData
* Optional data that, if specified, must also be provided during decryption
* through
* DecryptRequest.additional_authenticated_data.
Expand Down Expand Up @@ -429,11 +429,11 @@ const EncryptRequest = {
* CryptoKey to use for decryption. The
* server will choose the appropriate version.
*
* @property {string} ciphertext
* @property {Buffer} ciphertext
* Required. The encrypted data originally returned in
* EncryptResponse.ciphertext.
*
* @property {string} additionalAuthenticatedData
* @property {Buffer} additionalAuthenticatedData
* Optional data that must match the data originally supplied in
* EncryptRequest.additional_authenticated_data.
*
Expand Down Expand Up @@ -478,7 +478,7 @@ const AsymmetricSignRequest = {
* CryptoKeyVersion to use for
* decryption.
*
* @property {string} ciphertext
* @property {Buffer} ciphertext
* Required. The data encrypted with the named
* CryptoKeyVersion's public key using
* OAEP.
Expand All @@ -495,7 +495,7 @@ const AsymmetricDecryptRequest = {
* Response message for
* KeyManagementService.Decrypt.
*
* @property {string} plaintext
* @property {Buffer} plaintext
* The decrypted data originally supplied in
* EncryptRequest.plaintext.
*
Expand All @@ -516,7 +516,7 @@ const DecryptResponse = {
* CryptoKeyVersion used in
* encryption.
*
* @property {string} ciphertext
* @property {Buffer} ciphertext
* The encrypted data.
*
* @typedef EncryptResponse
Expand All @@ -531,7 +531,7 @@ const EncryptResponse = {
* Response message for
* KeyManagementService.AsymmetricSign.
*
* @property {string} signature
* @property {Buffer} signature
* The created signature.
*
* @typedef AsymmetricSignResponse
Expand All @@ -546,7 +546,7 @@ const AsymmetricSignResponse = {
* Response message for
* KeyManagementService.AsymmetricDecrypt.
*
* @property {string} plaintext
* @property {Buffer} plaintext
* The decrypted data originally encrypted with the matching public key.
*
* @typedef AsymmetricDecryptResponse
Expand Down Expand Up @@ -612,13 +612,13 @@ const RestoreCryptoKeyVersionRequest = {
/**
* A Digest holds a cryptographic message digest.
*
* @property {string} sha256
* @property {Buffer} sha256
* A message digest produced with the SHA-256 algorithm.
*
* @property {string} sha384
* @property {Buffer} sha384
* A message digest produced with the SHA-384 algorithm.
*
* @property {string} sha512
* @property {Buffer} sha512
* A message digest produced with the SHA-512 algorithm.
*
* @typedef Digest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ class KeyManagementServiceClient {
*
* If a CryptoKey is specified, the server
* will use its primary version.
* @param {string} request.plaintext
* @param {Buffer} request.plaintext
* Required. The data to encrypt. Must be no larger than 64KiB.
*
* The maximum size depends on the key version's
Expand All @@ -1348,7 +1348,7 @@ class KeyManagementServiceClient {
* HSM keys, the combined length of
* the plaintext and additional_authenticated_data fields must be no larger
* than 8KiB.
* @param {string} [request.additionalAuthenticatedData]
* @param {Buffer} [request.additionalAuthenticatedData]
* Optional data that, if specified, must also be provided during decryption
* through
* DecryptRequest.additional_authenticated_data.
Expand Down Expand Up @@ -1380,7 +1380,7 @@ class KeyManagementServiceClient {
* });
*
* const formattedName = client.cryptoKeyPathPath('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY_PATH]');
* const plaintext = '';
* const plaintext = Buffer.from('');
* const request = {
* name: formattedName,
* plaintext: plaintext,
Expand Down Expand Up @@ -1423,10 +1423,10 @@ class KeyManagementServiceClient {
* Required. The resource name of the
* CryptoKey to use for decryption. The
* server will choose the appropriate version.
* @param {string} request.ciphertext
* @param {Buffer} request.ciphertext
* Required. The encrypted data originally returned in
* EncryptResponse.ciphertext.
* @param {string} [request.additionalAuthenticatedData]
* @param {Buffer} [request.additionalAuthenticatedData]
* Optional data that must match the data originally supplied in
* EncryptRequest.additional_authenticated_data.
* @param {Object} [options]
Expand All @@ -1449,7 +1449,7 @@ class KeyManagementServiceClient {
* });
*
* const formattedName = client.cryptoKeyPath('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]');
* const ciphertext = '';
* const ciphertext = Buffer.from('');
* const request = {
* name: formattedName,
* ciphertext: ciphertext,
Expand Down Expand Up @@ -1763,7 +1763,7 @@ class KeyManagementServiceClient {
* Required. The resource name of the
* CryptoKeyVersion to use for
* decryption.
* @param {string} request.ciphertext
* @param {Buffer} request.ciphertext
* Required. The data encrypted with the named
* CryptoKeyVersion's public key using
* OAEP.
Expand All @@ -1787,7 +1787,7 @@ class KeyManagementServiceClient {
* });
*
* const formattedName = client.cryptoKeyVersionPath('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]');
* const ciphertext = '';
* const ciphertext = Buffer.from('');
* const request = {
* name: formattedName,
* ciphertext: ciphertext,
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-kms/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-05T14:19:24.011735Z",
"updateTime": "2019-06-12T11:17:31.164765Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.23.1",
"dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0"
"version": "0.24.1",
"dockerImage": "googleapis/artman@sha256:6018498e15310260dc9b03c9d576608908ed9fbabe42e1494ff3d827fea27b19"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b",
"internalRef": "251635729"
"sha": "f117dac435e96ebe58d85280a3faf2350c4d4219",
"internalRef": "252714985"
}
},
{
Expand Down

0 comments on commit 18fb2c7

Please sign in to comment.