Link to home
Start Free TrialLog in
Avatar of ClassicCPLus
ClassicCPLus

asked on

RijndaelManaged Key and vector error "Specified key is not a valid size for this algorithm".

Greetings Experts!

Will you send me an example of how to create the RijndaelManaged key and the vector and then how to convert it to a format I can save on the web.config, you see, I created it using RijndaelManaged.GenerateKey() and RijndaelManaged.GenerateIV() then converted to a string and saved it on the web.config . However when I retrieve the value from the web.config and then use Encoding.ASCII.GetBytes("Key") to pass the value to RijndaelManged.Key I get error: "Specified key is not a valid size for this algorithm". I hope this is clear, I really appreciate your help with this, I am stuck. I am using VS 2010, ASP.NET 4.0 with VB.NET 4.0,
ASKER CERTIFIED SOLUTION
Avatar of vr6r
vr6r

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ClassicCPLus
ClassicCPLus

ASKER

Thank You!!!! it worked perfect :). Have a wonderful x-mas the best for 2014.