All Products
Search
Document Center

Key Management Service:KMS instance SDK (PHP)

Last Updated:Aug 20, 2026

The KMS instance SDK (PHP) provides easy programmatic access to KMS instance APIs, facilitating tasks such as data encryption and decryption, digital signing and verification, and secret value retrieval.

Source code

For the SDK source code, see alibabacloud-dkms-gcs-php-sdk. The repository is published by Alibaba Cloud.

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

Sample file name

Description

AdvanceGenerateDataKey.php

Generates and decrypts a data key (DK).

AdvanceEncryptDecrypt.php

Encrypts and decrypts data, where the ciphertext uses the envelope format.

AesEncryptDecrypt.php

Encrypts and decrypts data, where the ciphertext uses the raw format.

SignVerify.php

Computes a digital signature for data and verifies the signature.

GetSecretValue.php

Retrieves a secret value.