c# - MachineKey.Protect and MachineKey.Unprotect -
i'm using .net 4.5 , machinekey.protect/machinekey.unprotect encrypting , decrypting values. i'm wondering when deploy code production we'll have multiple servers, machinekey.protect/machinekey.unprotect works without synchronizing machine keys?
here sample code decrypt:
var bytes = convert.frombase64string(token); var decryvalue = machinekey.unprotect(bytes, purpose); string plaintext = encoding.utf8.getstring(decryvalue);
let me know thoughts!
to unprotect data you'll need same machine key 1 used protect data. if need unprotect data protected server, servers must share same machine key.
Comments
Post a Comment