/// <summary> /// This Method Decrypts Any Value To Original String With Specific Ways Described In The Type /// </summary> /// <example>string Encryption.Decrypt("BlaBlaBla",Ecryptiontypes.FormAuth);</example> public static string Decrypt(string strToDecrypt, Encryptiontypes type) { string back = ""; try { switch (type) { case Encryptiontypes.Mine: MyEncryption my = new MyEncryption(); back = my.Decrypt(strToDecrypt); break; case Encryptiontypes.FormAuth: Encryption en = new Encryption(); back = en.DecryptFrmAuth(strToDecrypt); break; case Encryptiontypes.Des: SymmCrypto sy = new SymmCrypto(SymmCrypto.SymmProvEnum.DES); back = sy.Decrypting(strToDecrypt, ""); break; case Encryptiontypes.Rijndal: SymmCrypto syy = new SymmCrypto(SymmCrypto.SymmProvEnum.Rijndael); back = syy.Decrypting(strToDecrypt, ""); break; default: break; } } catch { back = ""; } return(back); }
public string DecryptRijndael(string val) { SymmCrypto sy = new SymmCrypto(SymmCrypto.SymmProvEnum.DES); return(sy.Decrypting(val, "")); }
public string DecryptDes(string val) { SymmCrypto sy = new SymmCrypto(SymmCrypto.SymmProvEnum.DES); return(sy.Decrypting(val, "AlHammadKey")); }