# mariadb-aes256

## Description:

MariaDB에서 AES 128/192/256 encryption을 지원하는 UDF(User defined function) 제공

## Features:

* AES 128 encrypt and decrypt
  * key length : 16byte
  * If the length of the key is 16byte, AES256\_ENCRYPT will operate in the same way as AES\_ENCRYPT.

    ```bash
    mysql> select HEX(AES256_ENCRYPT('strings', '0123456789abcdef'));
    mysql> select AES256_DECRYPT(UNHEX('encrypted_hash_string'), '0123456789abcdef');
    ```
* AES 192 encrypt and decrypt
  * key length : 24byte

    ```bash
    mysql> select HEX(AES256_ENCRYPT('strings', '0123456789abcdef01234567'));
    mysql> select AES256_DECRYPT(UNHEX('encrypted_hash_string'), '0123456789abcdef01234567');
    ```
* AES 256 encrypt and decrypt
  * key length : 32byte

    ```bash
    mysql> select HEX(AES256_ENCRYPT('strings', '0123456789abcdef0123456789abcdef'));
    mysql> select AES256_DECRYPT(UNHEX('encrypted_hash_string'), '0123456789abcdef0123456789abcdef');
    ```

## Reference:

* <https://github.com/Joungkyun/lib_mysqludf_aes256>

## Dependencies:

* [mariadb-server](/annyung-3-user-guide/annyung3-package-catalog/annyung3-base-packages/pkg-base-mariadb.md)

## Sub Packages:

## Releated Packages:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://joungkyun.gitbook.io/annyung-3-user-guide/annyung3-package-catalog/annyung3-core-packages/pkg-core-mariadb-aes256.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
