All Products
Search
Document Center

Key Management Service:KMS instance SDK (Java)

Last Updated:Jun 04, 2026

Use the KMS instance SDK for Java to encrypt and decrypt data, sign and verify signatures, and retrieve secret values through KMS instance APIs.

Source code

The SDK source code is available at alibabacloud-dkms-gcs-java-sdk.

API documentation

After you integrate the SDK, call KMS instance APIs through the KMS instance endpoint to generate data keys, encrypt and decrypt data, sign and verify signatures, and retrieve secret values. For API documentation, see Instance API Overview.

Sample code

The following table lists common examples. More samples are available in the SDK source code.

Sample file name

Description

AdvanceGenerateDataKeySample.java

Generates and decrypts data keys.

AdvanceEncryptAdvanceDecryptSample.java

Encrypts and decrypts data (ciphertext is in envelope format).

AesEncryptDecryptSample.java

Encrypts and decrypts data (ciphertext is in raw format).

Sha256AsymmetricSignVerifySample.java

Signs data and verifies digital signatures.

GetSecretValueSample.java

Retrieves secret values.