Decode/Decrypt string using jquery or javascript that was originally encoded in C# -
i have string encoded/encrypted using following c# code:
public static string encode(string text) { if (!enabled) return text; return "~/enc/" + system.convert.tobase64string( system.text.asciiencoding.ascii.getbytes(text)); }
how can decode/decrypt on client side , original string before encoded/encrypted?
i've tried atob(encodedstring) , doesn't return original value.
thank you,
nathan
you pass client url parameter in viewmodel - ie.
public sting ajaxurl {get;set;}
etc. ,then in model in javascript
var link = '@model.ajaxurl'
(this may defeat purpose of encryping link though.)
Comments
Post a Comment