vcc-kms-client 0.0.1
KMS is a key management system for data encryption, decryption, signing and verification
Requires Python: >=3.8

# Key Management Service (KMS)

# Install library

### Install
```php
$ pip install vcc-kms-client
```

## Table of contents
1. [Usage](#usage)
   - [Create KMS Key](#create-kms-key)
   - [Generate Data Key Pair](#generate-data-key-pair)
   - [Generate Data Key](#generate-data-key)
   - [Encrypt](#encrypt)
   - [Decrypt](#decrypt)
   - [Encrypt With Data Key](#encrypt-with-data-key)
   - [Decrypt With Data Key](#decrypt-with-data-key)
   - [Encrypt With Data Key Pair](#encrypt-with-data-key-pair)
   - [Decrypt With Data Key Pair](#decrypt-with-data-key-pair)
   - [Update Alias](#update-alias)
   - [Delete Alias](#delete-alias)
   - [Describe KMS Key](#describe-kms-key)
   - [Disable KMS Key](#disable-kms-key)
   - [Enable KMS Key](#enable-kms-key)
   - [Delete KMS Key](#delete-kms-key)
   - [List KMS Key By Alias](#list-kms-key-by-alias)
   - [List KMS Key](#list-kms-key)
   - [Update Description Key](#update-description-key)
   - [Sign](#sign)
   - [Verify](#verify)

## Usage
Add security_file.json into project

### Create KMS Key
This function generate KMS key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm
from src.vcc_kms_client.models.create_kms_key_request import CreateKMSKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = CreateKMSKeyRequest(None, None, algorithm.AES_256)
print(kms.create_key(request))
```
Response
```text
key_id = 01H0MM0QJSEMZ2ZX41AX5DJ2RJ, alias = None, algorithm = None, state = ENABLED, description = AES_256
```

### Generate Data Key Pair
This function generate data key pair, create plaintext private data key, encrypt private data key and plaintext public data key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm
from src.vcc_kms_client.models.generate_data_key_pair_request import GenerateDataKeyPairRequest

from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = GenerateDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', algorithm.RSA_2048)
print(kms.generate_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, algorithm = RSA_2048, encrypt_private_data_key = 6xFLebILYz81LxcH7eSoxiuXEcLrmzAvFocHI8I7bhdxRNo5LTixNU1+V635DPopAnPVKjIR1l80pv5aqfHuNHWSfzInlANJnAb3VqJurZN8AfejmhZrhrsBkbChrDkhDnGydj6gshbcIwNTcsmnrkv8ys7Xmjl/hWMAtNATj4VoxkxvYuhTaPXZyz0kUYGd5qn5UJN5EKyqKKcGKtE3g+Less/PA3hMe7uu8LsSc3qs04LijhO7T74RUcfoLzwZASyJFJ86ugZ3z5TmEihgZAjfDeg1newhZMjk3F5q0t9o1K87KyG3J8oWK2Zpsyij41e89UDnH+95J9IjU/FqRTzvq6hXkpHX+Lb0eOK+1hKiHSYb3Xga8pR2Rf9jWFe0hAte1u6imnvy/je5TZH4ex5h9H649APx6KZUlNXpVscWrRLg4deIjEhgxYs3t2yBY72gpJX4bMU1yrD+O+pRrp5TWNYNPVHiqX3sgDSc1r3rJbldDifz7JWblz5ivQvjVVMgFDjlFw80CXk+mF9QYoW9ewuUhkKrgah5tMkwj7cCSbCcTbY38jmZSJsY45mEaUpu6CxRGhrgJ2JZPTe0YCqGd8S40B9XugkXdQia7T9OFRWxGF9a8V6+lu4tlPZpQBGWEnJwnQDCAV7SPUfaKZOeqkyYTNrPTYQZZQbGgG81FSezBMcL5F/vu8AQOjg/q2fDFLjuR+7J6GYDQ3NrljQVxojr5cKay6K2fmGzgCuqA2KDczzkcoCfhgyPtDKetLX6IO4xjF46aPozyLOo1Jc+f/4CFf9uTaALB8Og1PSqvphah2xRjQgB3EuyGouQzpcLv/FPAK0Y5bN57rMyoeVpJrPwoxRQfg51eDK1jxNysTw+DKZi9CRWqv2tI5O1nOaZVdoaJqpVmYViN0tn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utAdZNpTANYVchC07Sa/teXQZ8HNYbtzltqJc/VoT72h63eAytM4M/XIJeCX44nw3eN7YQ30l80wIDAQAB
```

### Generate Data Key
This function generate data key, create plaintext secret data key and encrypt secret data key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm
from src.vcc_kms_client.models.generate_data_key_request import GenerateDataKeyRequest

from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = GenerateDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', algorithm.AES_256)
print(kms.generate_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, algorithm = AES_256, plaintext_data_key = k1lvvTPcKOvXF4I1LPZE2XnKlcyyAQJspIQgWXdzjXo=, encrypt_data_key = wdXCZMn2ECxuL2npx9eXO5BwDVmW0PyqoCumo82GiJfHpNqaGYRSpDl3CchfOzqa
```

### Encrypt
This function encrypt data directly with KMS key
#### Encrypt single text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.encrypt_request import EncryptRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EncryptRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', 'cuong dep zai', content_type.SINGLE_STRING)
print(kms.encrypt(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = LoujTFUY5aELdmBB6b2N0g==, algorithm = AES_256
```
#### Encrypt list text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.encrypt_request import EncryptRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EncryptRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', ['cuong dep zai', 'asdasdasd'], content_type.LIST_STRING)
print(kms.encrypt(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['LoujTFUY5aELdmBB6b2N0g==', 's11DGSnLf6hUNHYNB6rwFQ=='], algorithm = AES_256
```
#### Encrypt list json

```python
import json

from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.encrypt_request import EncryptRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
x = {
   "name": "John",
   "age": 30,
   "city": "New York"
}
y = json.dumps(x)
request = EncryptRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [y], content_type.LIST_JSON_OBJECT)
print(kms.encrypt(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['{"city":"PFdV2PVgBbcQp+mQyd4usQ==","name":"IYMUmLTiP5rZFYA9zKIWTA==","age":"vBzZWDM9u3Fkt0yVQCl7Ow=="}'], algorithm = AES_256
```

### Decrypt
This function decrypt data directly with KMS key
#### Decrypt single text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_request import DecryptRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DecryptRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', 'LoujTFUY5aELdmBB6b2N0g==', content_type.SINGLE_STRING)
print(kms.decrypt(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = cuong dep zai
```
#### Decrypt list text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_request import DecryptRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DecryptRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', ['LoujTFUY5aELdmBB6b2N0g==', 's11DGSnLf6hUNHYNB6rwFQ=='],
                         content_type.LIST_STRING)
print(kms.decrypt(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['cuong dep zai', 'asdasdasd']
```
#### Decrypt list json

```python
import json

from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_request import DecryptRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
x = {
   "name": "IYMUmLTiP5rZFYA9zKIWTA==",
   "age": "vBzZWDM9u3Fkt0yVQCl7Ow==",
   "city": "PFdV2PVgBbcQp+mQyd4usQ=="
}
y = json.dumps(x)
request = DecryptRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [y], content_type.LIST_JSON_OBJECT)
print(kms.decrypt(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['{"city":"New York","name":"John","age":"30"}']
```

### Encrypt With Data Key
This function encrypt data with data key
#### Encrypt single text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm, content_type
from src.vcc_kms_client.models.encrypt_with_data_key_request import EncryptWithDataKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EncryptWithDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', 'cuong dep zai', algorithm.AES_256,
                                    content_type.SINGLE_STRING)
print(kms.encrypt_with_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = 7CqNRImiu2/DdnNoosdYnqYG4pzizC4EIzqDwbb2FUF3yNeSyOkq2yR9GlJinKu8xRXF/29i+Ep4VZdpOs85ap6JVyYeR+D6cBfPOLrUVJvNAXB2rnOPKC8qgMIO4AJf4cMKJ1HygepC62fE9wkIzhe1/+LOHiVp1RmEmQ9cqF4=, algorithm = AES_256
```
#### Encrypt list text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm, content_type
from src.vcc_kms_client.models.encrypt_with_data_key_request import EncryptWithDataKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EncryptWithDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', ['cuong dep zai', 'asdasdasd'], algorithm.AES_256,
                                    content_type.LIST_STRING)
print(kms.encrypt_with_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['7CqNRImiu2/DdnNoosdYnpuqkt8JzDdMdBjxaXC+X1TERkaNQuGRdW0K6fNGV3j0uPdNhQgCoVSKx8xfVqFJRn2rbzqZLo+z/GdBBg8+OgUQay+tLHeSx6LcITc+RQAQbXgC3FORp3FT/pmUrBd5OztNna8gSg1XOBTlp47r/Aw=', '7CqNRImiu2/DdnNoosdYnlTzfvCjzX9FzKR2FuNbQwQ9aRMZg8YNMNKI0sMjIcXnObZ7pvcUxvPTBr5CnLs7htBxDqM+VM7QFP3wogqgC8xUoyfbqXSQpDttVnRR7sr6dtXg2gnbWlBLzdjotDZulBPcF5w+DfukqKqldFcUN8M='], algorithm = AES_256
```
#### Encrypt list json

```python
import json

from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm, content_type
from src.vcc_kms_client.models.encrypt_with_data_key_request import EncryptWithDataKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
x = {
   "name": "John",
   "age": 30,
   "city": "New York"
}
y = json.dumps(x)
request = EncryptWithDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [y], algorithm.AES_256, content_type.LIST_JSON_OBJECT)
print(kms.encrypt_with_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['{"city":"7CqNRImiu2/DdnNoosdYnsJptvZLDfhartHVhvwiPafXjXYRN6MBhINgU0PbfVAyHmrb4YsGvNZKchvHDMfSs/9+fX/fqOmreSbzIt/N3a0aKlOhbbKQOWjDm9/yFBLFiFMAMqVPyoZzFSa2KbO5nZAFLkWEUMxg9lpqzJKWSdA=","name":"7CqNRImiu2/DdnNoosdYnqQVa8HtVXmExXrPi9eEF29UzAialm4BqNSapkM3sFyXHEhaS6zJ+E9gQQPtCtrpdssHaAkV9jxCDuB6iR0Xewzn8y3nb61aYkwxJrMtStMDNsAa4qWuTagAtvpdeb/4oQ5diiP/tECaPQXN2tYyxfQ=","age":"7CqNRImiu2/DdnNoosdYnjjbATsiDJ0i4xcPQwRt567k+Y/MRd9yfI4rJDYANr8SyQ/mrKp8dogDyksie80Wf5vB2naf34mJ88jmU6YyCI44Wj0jV+z+yb9wh07zgNmcMNZDsMDl90dOUtH4x1Mp6MMt/DIvcmwgg9FOX+IxMaU="}'], algorithm = AES_256
```

### Decrypt With Data Key
This function decrypt data with data key
#### Decrypt single text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_with_data_key_request import DecryptWithDataKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DecryptWithDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS',
                                    '7CqNRImiu2/DdnNoosdYnsBE5OG9536Cm3i1ulWm8f4ZcBUt4w4C9v3CI+lk2q/d8QJHJWzf9j0ljhvsH4L+/6uYa6pItvBwNNmCzhoV6m/ZyRMsheVwtZNxILVTs9qMx0ma4bivTvvF+DjJj2X2q6AZOVKJ0v2QsD78Tk/yOUc=',
                                    content_type.SINGLE_STRING)
print(kms.decrypt_with_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = cuong dep zai
```
#### Decrypt list text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_with_data_key_request import DecryptWithDataKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DecryptWithDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [
   '7CqNRImiu2/DdnNoosdYnmtjitw05f0yj+ZaVggwGZbtxYKlG1dpnEylu+yL+nJFlJceXbptMvLtoX2iauXUfUGna7kY1JtJHoJbMIKYRBY7lBXMUimVH60de4I6gcaLl3T1pBZcs+kXOkpggIwSaDG880ExuSv9CFcRFUUEAvc='],
                                    content_type.LIST_STRING)
print(kms.decrypt_with_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['cuong dep zai']
```
#### Decrypt list json

```python
import json

from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_with_data_key_request import DecryptWithDataKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
x = {
   "name": "7CqNRImiu2/DdnNoosdYnpe87Xr+x7AOLNni46fKzsKVuG2YKgz6lD5pbdkgO94dmNLB9O1/MDaMhoXvJvqE/8JdmKCicHEygizphFWleP4JSM8sdxYmI0B2fVZhT3lqlfUs60Lfkw1ldGeCbx1w85W335RrpjBI7O2kJXaWIdI=",
   "age": "7CqNRImiu2/DdnNoosdYnnxYyyMhVU9FGFfC5pEJm6VW2SeLpYoHzVtGUF87NXwj/k2MslgSZKYVGZ3EhrisIBC1tFR5AeL97WsUClSP989Es3HlTIPJODCFRZngjdjHpVIFbXrfzZGU2yqlxLtJfe44h7BWckg3HFRVzq1Hpw4=",
   "city": "7CqNRImiu2/DdnNoosdYnkcWN01M9TuSTp1iBKr4tkvfma27HtX84d4BZSdXzXx4o550Dd/iW6yqVB+NMJ0HE5r439gaqxcmojf5zF8OAszJzqniNRDJZn7t1DtnRp3Yzbebj3/ErW7t2EDicjae5O4NNgrTZc3Dap9bB2vMSSU="
}
y = json.dumps(x)
request = DecryptWithDataKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [y], content_type.LIST_JSON_OBJECT)
print(kms.decrypt_with_data_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['{"city":"New York","name":"John","age":"30"}']
```

### Encrypt With Data Key Pair
This function encrypt data with data key pair
#### Encrypt single text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm, content_type
from src.vcc_kms_client.models.encrypt_with_data_key_pair_request import EncryptWithDataKeyPairRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EncryptWithDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', 'cuong dep zai', algorithm.RSA_2048,
                                        content_type.SINGLE_STRING)
print(kms.encrypt_with_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = 7CqNRImiu2/DdnNoosdYnqpePJDROfyW5ZfAs6a3ZWUTJGOLBFkjjyNzWGw6zBVxsNWymkZU/7+FiR0fa1hn1bf+y+J/5VqtBWQrb6xBokDh10WdBbUeb0nqGvyuTv/ebZ1D/eyXSGcpdg0LyCRZfBPfGdXPahV+rQbeS9BPSC8goOpdjvN9XGF98RS41cuGo+uiwnbsWPbc1HIcetng7czGOUb5wONT77pBHZJNEso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Qh8j5Rv2M2G9bq7UId0w78QtIXX0CjlztLNwd2z3QXr34b20vzcNNE2Hsz1XyPUjVGGOeu5MBk+dPc6BEY4nB99s9vArJIX5W19+V2HFzqSmHCK0lPSMb7aj0MoyL9lJktHPp0fmX+RDxp4dLgkmyIHYfd9ctgwOWih2tBUf4Etsglxn/eoxTr4EnNDWGMvl0fWljUMj/X549Hws6mR9V9+2G58NLd7ZboMDrWcYgCD3C3Pa7mkes7/k7zRhiFRlVxzRjG/y6JqXNgpikkfIX6+LxebZSUvNYbLm5M98Zp3em0N4HEVxJXF9pJa39idvo/CSdd20cersarbNMFyyXibWFzOvFiiBRf69AUqLHTNmOgTkrAOGgBLgtaTjwLN2DAr+L7hgu3UgSdHBeMoZPfZ/MI8mdvk3FK4vVwb1h6RP1G+9t47g/O4b3t6EeQvIBU4G/GUGogY/zOT8ETxx5+2rj+1jkmQRu0oGW3O4wr3uBDSOoLE9mGLz6gdNjnvJ1SDgtBbYvlTjarQqpEPJNRWHrmuFlXAFiSLdL+DAjzPwc/e7s9ce1inDwg3h2FAvLlnItF2/9xPtXPFPmruhLWuZQJ5eZeMNyAXKNWC8WbfZrIVSKgGrAnDVa2oif/LlVCRzenHOCnf2cqERoM0dLeBaGINOp50qnXhf4A831r8uF2PTz1QROub1sBnpPzGs4aXW3Y/1zg5oPkuAJBEczuM1oFpamuf1Efx326NiydAxQZTwf25gpHjgSCbbi0JCgK3BKD2kmCFC8STAb8K+lnNF6KeLBvf+zUzadmefhNmAYV7/CHy8lM6dozSRY5ev/VWeKENsFz1Ng4r6soeGJLeZSgEwLfLMJ8D4lphMBe4D5p68FsikCaPWlsJAIm39OYpkB/gr+XTiOTLMb97/+2NkZC5V5UP7SpyM59F51luuCdjT47ugSskr8hlZSD2DnoxwoNgPw/60n5SdwwHHJUAm7IEZvZ/V4T7njR+CjUapZHAJYazA+nzA==, algorithm = RSA_2048
```
#### Encrypt list text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm, content_type
from src.vcc_kms_client.models.encrypt_with_data_key_pair_request import EncryptWithDataKeyPairRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EncryptWithDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', ['cuong dep zai'], algorithm.RSA_2048,
                                        content_type.LIST_STRING)
print(kms.encrypt_with_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['7CqNRImiu2/DdnNoosdYngabvryueOyCENJ9NjC+BYtYvLGcHriNzm/oawLbOh9Q1z9ylxBIeN1CVFYztYilwN3obyIDFick/lKgU25QTR5ayQZLFrWnErmoWTFiSQkWEk1nWBMbsgmaB0UDcvB73ff32AtmRLMDj0MeFx1+1/z9UvvqpT+qnMVCcm93leVkg01v/HxD0i2GEYTOrY5xrfQrt+t6ceCm5ePgMEfo8Fdu0bh2VYD0gn/8nrsgJNns0SiDsqimX1GE75ljX0Cwmld5AFTqkaE4hr2M5BuqclFI0d57RppXUNafczQa6feEoczEqCQraXgXclqq9AHlCRFSUabWz1T58c60TcP9S51OtPi88drQhe2Paw6XZPiWHgVvKrADFlaOyZg+4oHMZsksmBNbIEJ3NaoL7H+PNiirGodLls4BLfXpmZQ5eol0ZtyS4penXbhYij2j05qUII+GVOk9dGMk4yp+DsynBQSxNycrcHm3rFto85KoEps6G/VWm3ZTl7fUkV/53Dwwa6K/g1Dt1OEA3LBX/T//SuPq2ECGQQmLIaiR9SJwF2qySmkkoiHUmqBoMx8uPimvznmbw9XA5/kTJ8uRpLeb93lZaTjeBvNJXLlKf5ZP06zEP1z8aHQsaFe3O7RnAJCfkNVaM0I2oM5eYba6PFtQ/M75nqVgOvfx2KtZgitUlkwQQwxKVJMeYWStIdMn2tTcaz8CJ11MxM8yqSWvqPOv45fkt7VqkW8GjBGvJNnT2xvJbiV4Px4DiCMcYfYad73mlW/I31SAS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f8XaTfBPGR/JYhNs3J4QeIZzsl+qTuMOx1byPZgcKMZU8h5qoxDHO/ydNPH/mOgZ3EH5ThfOAGdGIwrIbJV0+SFu3qG3S8ex1IgVDWxBOZTRCVPpLyRQb55RecRhvbVLuasJQG5rEnxO7U/QdgFzqp6TmeX0zz7F8dUsbcG8UA1zaGvMRh6YPRS0Tj+kGmGxFym7w7q40Vyot2ReTCk/Ra2M/1OCUzmEBm1nLLPFZUfMg9nW1qYPPilRnKgfOvy/dLqf1sEDgEP0rxcd0gglJznMzxJHS8oY0RhoJM0a3XxGh6UUOhF4axECaCPP8o8TymQuH6dKSEpYQDM3/Vw+SR/rSEOu7tIZj01Qaw24rv2WYHlLG5+xRtcU30mzecZr/IrC8e5VPHGWeVKt5Wcuf8UzyHadPEp2Np2Z/oL70VE9+SBMraIvHA9wprwYFNzbgVS78oagK6oZxOy1bhw=='], algorithm = RSA_2048
```
#### Encrypt list json

```python
import json

from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import algorithm, content_type
from src.vcc_kms_client.models.encrypt_with_data_key_pair_request import EncryptWithDataKeyPairRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
x = {
   "name": "John"
}
y = json.dumps(x)
request = EncryptWithDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [y], algorithm.RSA_2048,
                                        content_type.LIST_JSON_OBJECT)
print(kms.encrypt_with_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['{"name":"7CqNRImiu2/DdnNoosdYntLP5WiLAsgfAEJ2RcYIzBVEU8mQ1LYsMNz0PR81f1w4h0H09H1mdVVHZC4+OwwlcX72sZTpSHu/rJf/WFg81bFTEqKn27qS4m7y9/GWMum1wSJ2V8mau9RGiuHhnFkk9QEKbvlPMmu4Qw7e0ZMngaUF+MPGnTU5yMA2AmW6H9BIeyI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data Key Pair
This function decrypt data with data key pair
#### Decrypt single text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_with_data_key_pair_request import DecryptWithDataKeyPairRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DecryptWithDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS',
                                        '7CqNRImiu2/DdnNoosdYnrdKUQflUy63mhsMaLKzS9VKUJmbd0gQXn3yoKmP4p3DmGMq0WO+fNoMMgWPeDv1xnLEq2F3k/GffYGDMrKleCUjlXPtzkFYjDxWAE695msCUk/E2EMTA8kmFWA9MGbf1H2Op8oUb45SwiKpLwV/NXVMkGj16DlyTbvtwBztu2A8xiAE7BtbmmvL9aot9tONvHr7aNgENyK5zlLLSVUx7BQCL6lR0MARzyms0K2S8H4d1MtxkszLUQQIIc9OiVd4TJO0gLnj24Tp2A04ZyQTSVavkm/WTlK1rAXWM7JA5qV4DeGW7/WJYfaG3AHvCdzZJfadn5akRgk3FQ03ZlHpVS9GboJgf7Qe3RlzlZ/EqHrOypXGoWpQUUwWQs2lTzqWI5Wvfh20uzw2y3o8u6WffRGLamqUGejjLbLReHJc7rIOaYkW2V+g096YpGY67rgKUz9nVs7KyK2yk8xxHxski2yY5PVUw+GwK1aGd9Igqq90HSqr0tx1xKmAbkoieluro2RnYnYy3oEV/E4/ZAQxSBbhhZcZSxTuEeiDmhcwkJcsvijVbWffsMKArqPZ0eI8mppMWN+4GKhKk03G+XFY8wp1wbA6Tq2iAokiCajbVhwpaABQhF89A+yNXzLqqs7ZUUmkV0zfjaKbHNlvobTmDBOTWSkabC24gWn6dk2vZ5VTdn8KqONL4NgXqrqEhJuOyNx7taAufYGjmHRldTAyGkO/QtpRcYauuOI5B4UXBUr6vZRFC0RJBWdCTGaHduqqXZRFhbC/GWeHZ3U1iJAm29PoYrH1HcmD7L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UC51a4cK+IL0yaBt/C78cy2z4Laq6rHKQj9eyXh0Kz+TrD5+coXsHu/vk6RL0Ywd/ot9b7OKBHv+/OlMT/gjvmS666yDQgQgT8dXNHScbPDHxyZIpxAETIw2X9iOfqRoKU71iQGpW7llnICn72n99bLPmPY3PCTPP5H1UILJDhP3U+sC9nUC793I8qLFLUWFqBNID+csovZrmVRoaq0hXct9sQg9d55lytJ6eJE6W1Qssta06s9NjlpRNxoOEjAHuBoFzAlWb/Z66QIf7dHahsHpk9ogkL8D9A4taj6TvEMmbE5D7hfX9t2L41grzW2iPqnnezNtFdctxtXgdGoR1Zeg3MRZ8+MfhTslNtFvhMfXuFg/INCxbB4ddZBs/DluHJAYOrBBzaE9knRpHyh65GtdrX4qpsUnuu6we5XVofePs1EPKDoIhm7+JJItUS7A/NA==',
                                        content_type.SINGLE_STRING)
print(kms.decrypt_with_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = cuong dep zai
```
#### Decrypt list text

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_with_data_key_pair_request import DecryptWithDataKeyPairRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DecryptWithDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [
   '7CqNRImiu2/DdnNoosdYnmPCWGywRrRM5NQ89ANr/UdzPvYf3+qqGmq7Yn3Seyyh/mE1t3G7i1VVxyeP835QLdwDLR19wyzNiGRZU9xC44MGoo91SUMwi3RMQRo2nxPmHzFWq7tKJ7ssw8yLe8jCter/82Q6IPTmQJBRZaAYiFr+Umlp7xFSA0uv8syFTD84ScPO0EnNoxbQA6u4WVC95/Z07BtKZr1udXMGJdpkBYxrhiAI+NfIKHl7l8sGQ1FFyJvhK2VNAOHtT/HFFSi7MAfG0LeNyJBF2AQKCS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iQbVydDD9e7aQG4aiM3Zx9IPXIiid86LNSrR27f4eV5WEuCTkc8CbEbUarQTBHJQ3nbiEZeSYePdCAdU63DbSINaX3qImYna37YUXtKIwF2ssFnKrJqosX3qa115QDu+Jb0aGr85fSKF2gIh6HKcFoWHGDce0aDaBzXnizQl07PXcYajwnzT1uramsiMiEZuyr2GccICe2VscG+HOT24LKA6bRGH0K3/cCjapo8OuugfqXHMshHkv+g9B/weGwmhctVKnehON75Hk3HQfXBnPGQELaklWLxnwD1+pSISNHYamb5W5iKcSZcigVXomF8lN4HjzwdCw4tmKeXhEFHgs0zc4YlIxPtG8vTGgI8c4Gry4Y4DMoateGzLChBf5HPIGu87GhKQqHv4/QCx8cXNtkHwtaQpIQoOw9heTq3FEcIbm1bNgS5ne45uXIWEQ13q1GQFdv328kQM2Yg+Ssd43tgTwu6tbd4KWseckyLIpOisMO6BaOCpHrFB0GOE/T9EvHUGPGZxd+HfAgTdxZ1KfymxPjvtHDbqExBw4QcWpHEayZ0a2Dr7GoQnK2dkNH3OEXm5gLR5h/jee9M3a2QMiqllac7oBHkkNWe9BpcWYjCfApmtVWEp5m6Y9X+kOnMPqUSBsHbNgt5gVbu3pQJzRmMauG3f1trNpgAfkkJ4cLwHc7TTsEal9W2Ii8EJEmX/2g3fsg2TaooDM9AaAxWmm1IJo4tpYfucTYh0Xj1XBLQbzNNH8o2X2SzrkNmlSHraDIIQcWeUJOo26KA7ozae3CJzlLu/dE8KsV95i3u6Y2UUuk13VhnHoI81ghVlNL7oFlRSBytCJDqIZ1vmnvvb9bjxyJbCntAFRRgQ9qZyORwwU2zb7iar1fN2wCs3e0oBz98v2qD4T6+dPlS0qFYoAf/XaPLmMtszljf0UaNXKT1/Y7eCa3cvjNQARa5Wh7kKl9wMwg=='],
                                        content_type.LIST_STRING)
print(kms.decrypt_with_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['cuong dep zai']
```
#### Decrypt list json

```python
import json

from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import content_type
from src.vcc_kms_client.models.decrypt_with_data_key_pair_request import DecryptWithDataKeyPairRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
x = {
   "name": "7CqNRImiu2/DdnNoosdYnofiCqxJwaqIIR+gKTHiQiNJWiOYNK4erdVb0X0ZqiBwLkI4SIRjU7V5IMYLKAVEt+lMXWv13t2VYNyMUbG6+lbBjLzSlEck9NptevqgGa8LFgzZ5EcHr84RhpKP/MAH2mtD96whu0QQM2BkxHElT14MV5tIXsMGKMjkDztWoN0IAqkJ14vp0EMNrvZ01JL5QEsqgryVw2z+5xugUjL/dYcCvxji3pIfvEktgOhDJyrsEIC8Rlz9om+tjfZf8fRZVKfntMCMT0ZB241lt7nIceFI8mfHOirdGnvkPOa6Znp66Vdp6D3D/H3EuN6qSPBAxPI1A+t6bjZpw3+7dMqwmE//uGveEz1lMoChWqtUpnONm8dFnyq4RRN9VsL2RO/7k25gWgTd7JSAqLui2Af7RMtZoTss5sk2x5+F2I49tnKCPmX179nm+a+4DIYnAwyS+eFYF3n7PgMxC73gbVGPHiqMTGLnpX0jPX7FGLl/zjjrCXh3WQgqVsmGy81tUif/XCVdbASiiSi65LkYzNsEZAEHwMqDo8H4rTLeMHkNlGhl5E0UgTDuIGAfWj4Ya/RXJudppjLkEqKuBDodTokww3+tqNyt71VEMfvPqg45WW3p3nDLxog+1yCEstsB4v7346cHzwVWdXsRn0JRipiJO6SL7zlAj7anG4xABjygOFgxrlpUSGmfPQxUo0UGckwHroWs2YgGviq0azujvfOJbMFz+4ZtFNrs3Ry5uHAX/Ft9EKmhpiyYZsfq1i6BhdsJHkxIb7BGx98AHz6NHCFt9Ss0hE6QGyRFIFQwLPjQTDcdGi+8b2uta07epjI+Wf6QicSLXMiDxME5F0yH6njxVqscnPWVnf0lzIKqZuvIoQ9uRTI0RS1ar1IeWF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FsxvkwZ+CybUYilY08W/q2cJROopgbOmCd83fEFDbfCxVWzJwNsBVKcIrJ7qu3B4c8EqY0jRuJlSPW8s8ysa0PPgxzaMPdpPZuAK6fdD2MDwShDcyc7ZYh6ggn1R2yZIRYW+0ZMJ6uX7/grDBWPa1NqxBzHa3pBYIcSKm0KZYoXLRc+yEbTNqiVUWm3m33TSSCc2OK3zztBLlj6VFKpr36rYhXNfOu4qlF3ncAB+5Ih0aNhFlXjEK3850wJa+G9xHKCgCEdSM93q0Y20KJR55tKZ5X0PYUgBudECH3RFnO04436tkX8z/g9x14Oqu3Tx7w=="
}
y = json.dumps(x)
request = DecryptWithDataKeyPairRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', [y], content_type.LIST_JSON_OBJECT)
print(kms.decrypt_with_data_key_pair(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, output = ['{"name":"John"}']
```

### Update Alias
This function update alias key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.update_alias_key_request import UpdateAliasKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = UpdateAliasKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', 'ssss dep zai')
print(kms.update_alias_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, alias = ssss dep zai
```

### Delete Alias
This function delete alias key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.delete_alias_key_request import DeleteAliasKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DeleteAliasKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS')
print(kms.delete_alias_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS
```

### Describe KMS Key
This function view KMS Key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.describe_kms_key_request import DescribeKMSKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DescribeKMSKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS')
print(kms.describe_kms_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, alias = dsafasfasfasasfasf, algorithm = None, state = ENABLED, description = AES_256
```

### Disable KMS Key
This function disable KMS key, when in this state Disable, KMS Key will not be able to use the encrypted, decrypted and generated

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.disable_kms_key_request import DisableKMSKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DisableKMSKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS')
print(kms.disable_kms_key(request))
```
Response
```text
key_id = 01H0FB74RH8Z3C9CP696ACPC1G, state = DISABLED
```

### Enable KMS Key
This function enable KMS key, when in this state Enable, KMS Key will be able to use the encrypted, decrypted and generated

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.enable_kms_key_request import EnableKMSKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = EnableKMSKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS')
print(kms.enable_kms_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, state = ENABLED
```

### Delete KMS Key
This function delete KMS, key will not be deleted immediately but will be deleted after 7 days

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.delete_kms_key_request import DeleteKMSKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = DeleteKMSKeyRequest('01H0PDX0YRWPEY3GRR2D833E09')
print(kms.delete_kms_key(request))
```
Response
```text
key_id = 01H0PDX0YRWPEY3GRR2D833E09, state = SCHEDULED_DELETION
```

### List KMS Key By Alias
This function list KMS Key by alias when the user has permission view those keys

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.list_kms_key_by_alias_request import ListKMSKeyByAliasRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = ListKMSKeyByAliasRequest(1, 0, 'cuong dep zai')
print(kms.list_key_by_alias(request).keys[0])
```
Response
```text
key_id = 01GZJT8VX8ZD3TVNN0VZXD3J69, alias = dsafasfasfasasfasf, algorithm = cuong dep zai, state = ENABLED, description = AES_256
```

### List KMS Key
This function list key when the user has permission view those keys

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.list_kms_key_request import ListKMSKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = ListKMSKeyRequest(3, 0)
for key in kms.list_key(request).keys:
   print(key)
```
Response
```text
key_id = 01GVD5HP5NSS0AZAX9D4E6Y1RX, alias = None, algorithm = cuongdepzai3, state = ENABLED, description = AES_256
key_id = 01GVD5JGAX1ESW09PN3BFQ7XBE, alias = None, algorithm = cuongdepzai4, state = ENABLED, description = RSA_2048
key_id = 01GVD5MX66PRTEJGD08ZTPXS4S, alias = None, algorithm = cuongdepzai5, state = ENABLED, description = RSA_3072
```

### Update Description Key
This function update description key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models.update_description_key_request import UpdateDescriptionKeyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = UpdateDescriptionKeyRequest('01GZZWTJYTNRGEQ8YMQQ7H6KMS', 'dsafasfasfasasfasf')
print(kms.update_description_key(request))
```
Response
```text
key_id = 01GZZWTJYTNRGEQ8YMQQ7H6KMS, description = dsafasfasfasasfasf
```

### Sign
This function sign message with KMS key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import sign_algorithm
from src.vcc_kms_client.models.sign_request import SignRequest

from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = SignRequest('01GZX850ZW3W4HC40T1ZX6V8NA', 'cuong dep zai', sign_algorithm.SHA512_RSA)
print(kms.sign(request))
```
Response
```text
key_id = 01GZX850ZW3W4HC40T1ZX6V8NA, signature = C/PDWwJ2NpsqbwJTVDKqosFue+rs3dl+vKPbdVqh9zIc6Lnm33/WadCA2X+tMs87UOxaeuIn+NtgL6Jnh3ZgkkWB086ltp/YbccG+H9mxCc/OXKSP2hOZdO7bE5HXi4RyoXG3Mcv/ckXlgP02v9U2gehvQCOA9mcP3XDTZvHxCvU+WQpIt/QiNW3Ov150X7HrHt9vRFlX8cY1ciLH4esDcqshLY0Cw/SinB4hUJ8eX5DanQ/5VMZY12SLMQL+y9sifrmJNIe9WP0Gysp8yGPCwcO+zP49TrEs/zmMvkUscf3+0tJTFYetF4a4+zhI7QoaV/4FWPVaBVoh7kkb0HolQ==, sign_algorithm = SHA512withRSA
```

### Verify
This function verify message with KMS key

```python
from src.vcc_kms_client.auth.kms_credentials import KMSCredentials
from src.vcc_kms_client.models import sign_algorithm
from src.vcc_kms_client.models.verify_request import VerifyRequest
from src.vcc_kms_client.kms_client import KMSClient

f = open("file/security_file.json", "r")
credentals = KMSCredentials(f)
kms = KMSClient(credentals)
request = VerifyRequest('01GZX850ZW3W4HC40T1ZX6V8NA', 'cuong dep zai', sign_algorithm.SHA512_RSA,
                        'C/PDWwJ2NpsqbwJTVDKqosFue+rs3dl+vKPbdVqh9zIc6Lnm33/WadCA2X+tMs87UOxaeuIn+NtgL6Jnh3ZgkkWB086ltp/YbccG+H9mxCc/OXKSP2hOZdO7bE5HXi4RyoXG3Mcv/ckXlgP02v9U2gehvQCOA9mcP3XDTZvHxCvU+WQpIt/QiNW3Ov150X7HrHt9vRFlX8cY1ciLH4esDcqshLY0Cw/SinB4hUJ8eX5DanQ/5VMZY12SLMQL+y9sifrmJNIe9WP0Gysp8yGPCwcO+zP49TrEs/zmMvkUscf3+0tJTFYetF4a4+zhI7QoaV/4FWPVaBVoh7kkb0HolQ==')
print(kms.verify(request))
```
Response
```text
key_id = 01GZX850ZW3W4HC40T1ZX6V8NA, signature_valid = True, sign_algorithm = SHA512withRSA
```