File manager - Edit - G:/PleskVhosts/indiaminerals.in/tlt.INFOFIXDEVELOPERS.COM/LIBS/EncryptIS.cs
Back
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Web; namespace WebApp.LIBS { public class EncryptIS { public EncryptIS() { } Byte[] _key = { 132, 42, 53, 124, 75, 56, 87, 38, 9, 10, 161, 132, 183, 91, 105, 16, 117, 218, 149, 230, 221, 212, 235, 64 }; Byte[] _iv = { 83, 71, 26, 58, 54, 35, 22, 11, 83, 71, 26, 58, 54, 35, 22, 11 }; // decrypts a string that was encrypted using the Encrypt method public string Decrypt(String data) { string EncryptionKey = "ANILSAGARIS"; data = data.Replace(" ", "+"); byte[] cipherBytes = Convert.FromBase64String(data); using (Aes encryptor = Aes.Create()) { Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.Key = pdb.GetBytes(32); encryptor.IV = pdb.GetBytes(16); using (MemoryStream ms = new MemoryStream()) { using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateDecryptor(), CryptoStreamMode.Write)) { cs.Write(cipherBytes, 0, cipherBytes.Length); cs.Close(); } data = Encoding.Unicode.GetString(ms.ToArray()); } } return data; } // Encrypts a given string public string Encrypt(String data) { string EncryptionKey = "ANILSAGARIS"; byte[] clearBytes = Encoding.Unicode.GetBytes(data); using (Aes encryptor = Aes.Create()) { Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.Key = pdb.GetBytes(32); encryptor.IV = pdb.GetBytes(16); using (MemoryStream ms = new MemoryStream()) { using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateEncryptor(), CryptoStreamMode.Write)) { cs.Write(clearBytes, 0, clearBytes.Length); cs.Close(); } data = Convert.ToBase64String(ms.ToArray()); } } return data; } } }
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.13 |
proxy
|
phpinfo
|
Settings