Encrypt
- Print
- PDF
Encrypt
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Encrypts data of up to 32 KB, with the current version of the specified master key. Only a key type for encryption and decryption can be specified.
POST https://kms.apigw.ntruss.com/keys/v1/{keyTag}/encrypt
POST https://kms.apigw.ntruss.com/keys/v2/{keyTag}/encrypt
Request
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyTag | String | Y | Tag of the master key for encryption. |
Request body
{
"plaintext" : string
}
Parameter | Type | Required | Description |
---|---|---|---|
plaintext | String or List of Strings | Y | Data to encrypt (up to 32 KB) (It needs to be Base64-encoded.) |
context | String | N | Context for key derivation (up to 50Byte) (It needs to be Base64-encoded.) Required only for Convergent Encryption |
Example of Request body
{
"plaintext" : "dGVzdA==",
"context" : "dGhpcyBpcyBhIHRlc3QgY29udGV4dA=="
}
Or
{
"plaintext" : ["dGVzdA==", "dGVzdDI=", "dGVzdDM="],
"context" : "dGhpcyBpcyBhIHRlc3QgY29udGV4dA=="
}
Response
Response body
{
"ciphertext" : string
}
Field | Type | Description |
---|---|---|
ciphertext | String | Ciphertext (It consists of a KMS prefix and Base64-encoded ciphertext.) |
Roles
Manager, Encryptor, Encryptor/Decryptor
Was this article helpful?