func googleKMSEncrypt(payload []byte, parentName string,
	kmsService *cloudkms.Service) (resultText []byte, err error) {
	req := &cloudkms.EncryptRequest{
		Plaintext: base64.StdEncoding.EncodeToString(payload),
	}
	var resp *cloudkms.EncryptResponse
	resp, err = kmsService.Projects.Locations.KeyRings.CryptoKeys.
		Encrypt(parentName, req).Do()
	check(err)
	var errm error
	resultText, errm = base64.StdEncoding.DecodeString(resp.Ciphertext)
	check(errm)
	return
}
//googleKMSEncrypt uses google kms to encypt a bite slice
googleKMSEncrypt uses google kms to encypt a bite slice
// googleKMSEncrypt uses google kms to encypt a bite slice
func googleKMSEncrypt(payload []byte, parentName string,
	kmsService *cloudkms.Service) (resultText []byte, err error) {
	req := &cloudkms.EncryptRequest{
		Plaintext: base64.StdEncoding.EncodeToString(payload),
	}
	var resp *cloudkms.EncryptResponse
	resp, err = kmsService.Projects.Locations.KeyRings.CryptoKeys.
		Encrypt(parentName, req).Do()
	check(err)
	var errm error
	resultText, errm = base64.StdEncoding.DecodeString(resp.Ciphertext)
	check(errm)
	return
}
func googleKMSEncrypt ( payload [ ] byte , parentName string , kmsService * cloudkms . Service ) ( resultText [ ] byte , err error ) { req := & cloudkms . EncryptRequest { Plaintext : base64 . StdEncoding . EncodeToString ( payload ) , } var resp * cloudkms . EncryptResponse resp , err = kmsService . Projects . Locations . KeyRings . CryptoKeys . Encrypt ( parentName , req ) . Do ( ) check ( err ) var errm error resultText , errm = base64 . StdEncoding . DecodeString ( resp . Ciphertext ) check ( errm ) return }
googleKMSEncrypt uses google kms to encypt a bite slice
googleKMSEncrypt uses google kms to encypt a bite slice