We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
done with clr
Sorry, something went wrong.
Want to directly query the decrypted data in the database management tool
yes , create a .net framework library project , with same algorithm , use that dll as clr by creating the functions
my sql script
`SET @keybase = 'xxx'; SET @encrypted_data = 'xxx';
SET @@SESSION.block_encryption_mode = 'aes-256-cbc';
-- Convert the keyBase to binary SET @keyBaseBinary = CONVERT(@keybase USING utf8);
-- Convert the binary keyBase to Base64 SET @key = TO_BASE64(@keyBaseBinary);
-- Decode the keyBase from Base64 encoding SET @binary_encrypted_data = FROM_BASE64(@encrypted_data);
-- Extract the first 16 bytes from the decoded data as the IV SET @Iv = SUBSTRING(@binary_encrypted_data, 1, 16);
-- Remove the IV from the binary data SET @data_without_iv = SUBSTRING(@binary_encrypted_data, 17);
-- Decrypt the data using AES_DECRYPT in MySQL SELECT CAST(AES_DECRYPT(@data_without_iv, @key, @Iv) AS CHAR) AS decrypted_data;`
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: