Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I would like to store encrypted string generated by RSA algorithm in database. As far as i know due to random padding rsa will generate different encrypted string every time for same plain text. Is there any way to store and compare these values in c# and sql?

What I have tried:

I am using default rsacryptoserviceprovider class encrypt decrypt methods.
Posted
Updated 5-May-17 19:45pm

1 solution

Decrypt it. Unless you know which bits are the random padding, you can't compare them - and you don't!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900