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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -