GcpKmsConfig (kms/gcp.rs)

hyperswitch · crates/cloud_services/src/kms/gcp.rs · rust · Apache-2.0
integration

Defines a GCP KMS client for encrypting/decrypting data with base64 handling and error types.

// Source: https://github.com/juspay/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Interactions with the GCP Cloud KMS SDK

use base64::Engine;
use google_cloud_gax::{conn::Error as ConnectionError, grpc::Status};
use google_cloud_kms::{
    client::{google_cloud_auth::error::Error as AuthError, Client, ClientConfig},
    grpc::kms::v1::{DecryptRequest, EncryptRequest},
};

/// Base64 engine used to encode ciphertext returned to, and decode ciphertext received from, callers.
const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;

/// Configuration parameters required for constructing a [`GcpKmsClient`].
#[derive(Clone, De

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key