MCPcopy Index your code
hub / github.com/dataease/SQLBot / aes_encrypt

Function aes_encrypt

backend/apps/datasource/utils/utils.py:7–12  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

5key = b'SQLBot1234567890'
6
7def aes_encrypt(data):
8 data = bytes(data,'utf-8')
9 cipher = AES.new(key, AES.MODE_ECB)
10 data = pad(data, AES.block_size)
11 encrypt = cipher.encrypt(data)
12 return base64.b64encode(encrypt)
13
14def aes_decrypt(encrypted_data):
15 encrypted_data = base64.b64decode(encrypted_data)

Callers 1

get_out_ds_confFunction · 0.90

Calls 1

bytesFunction · 0.85

Tested by

no test coverage detected