Last post Jul 03, 2017 07:59 AM by AngelinaJolie
Jul 01, 2017 01:47 AM|Aravinda Reddy.s|LINK
I want to encrypt and decrypt the string using AES 128 Algorithm with secret key. Probably using crypto
Secret key is any string value not bytes.
Once encrypted it should return back string only not bytes.
string Secret key = "380db410e8b11fa9"
Encrypted string = "skAc5IDdsvXWLeVsvUSTdOOPMsTPhseWoHB1z/s1zfQKoU42Mwf8IvD/2QLYzDqE"
Jul 01, 2017 06:24 PM|bruce (sqlwork.com)|LINK
you encrypt with the standard library which gives a byte array:
then you convert the byte array to base64 string:
decrypt is the reverse. convert base64 string to byte array, then decrypt.
Jul 01, 2017 06:53 PM|Aravinda Reddy.s|LINK
But can we decrypt the above encrypted string with this logic?
Jul 03, 2017 07:59 AM|AngelinaJolie|LINK
can we decrypt the above encrypted string with this logic?
Please use MD5CryptoServiceProvider which is the best encryption logic provider. You can go through with this
article for help.
If required, you can write your own logic for
encryption and decryption in C#
And an example about
Encryption and Decryption in C#.
Hope these will help you.