Reputation: 23
What will be equivalent encryption logic in MySQL ? Using something like following is not yielding require result.
select sha2('Tpostest123',256);
Upvotes: 2
Views: 73
Reputation: 98508
SHA2 returns a hexidecimal string value; you want it in base64 form instead. For that, do:
select to_base64(unhex(sha2('Tpostest123',256)));
Upvotes: 1