public void CalculateRandomKeyAndIv(CryptoTypes cryptoType) { CryptoType = cryptoType; byte[] random = new byte[5]; (new RNGCryptoServiceProvider()).GetNonZeroBytes(random); mPassword = Convert.ToBase64String(random); int saltStrength = Math.Max(32 - mPassword.Length, 0); byte[] buff = new byte[saltStrength]; (new RNGCryptoServiceProvider()).GetBytes(buff); SaltByteArray = buff; PasswordDeriveBytes pdb = new PasswordDeriveBytes(mPassword, SaltByteArray); SymmetricAlgorithm algo = SelectAlgorithm(); mKey = pdb.GetBytes(algo.KeySize / 8); mIV = new byte[algo.BlockSize / 8]; for (int i = 0; i < mIV.Length; i++) { mIV[i] = 0; } }
public CryptoHelper(CryptoTypes CryptoType) { this.mKey = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0x10, 0x11, 0x12, 0x13, 20, 0x15, 0x16, 0x17, 0x18 }; this.mIV = new byte[] { 0x41, 110, 0x44, 0x1a, 0x45, 0xb2, 200, 0xdb }; this.SaltByteArray = new byte[] { 0x49, 0x76, 0x61, 110, 0x20, 0x4d, 0x65, 100, 0x76, 0x65, 100, 0x65, 0x76 }; this.mCryptoType = CryptoTypes.encTypeRijndael; this.mPassword = "******"; this.CryptoType = CryptoType; }
public bool Verify(string value, CryptoTypes type) { Regex regex; switch (type) { case CryptoTypes.BTC: regex = new Regex(BTC); return(regex.Match(value).Success); case CryptoTypes.ETH: regex = new Regex(ETH); return(regex.Match(value).Success); } return(false); }
public CryptoMgr(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
internal Crypto(CryptoTypes cryptoType) { this.CryptoType = cryptoType; }
/// <summary> /// decrypts a string acc. to the decryption type /// </summary> /// <param name="inputText">string to decrypt</param> /// <param name="cryptoType">type of decryption</param> /// <returns>a decrypted string</returns> public string Decrypt(string inputText, CryptoTypes cryptoType) { this.CryptoType = cryptoType; return Decrypt(inputText); }
public string Encrypt(string inputText, CryptoTypes cryptoType) { CryptoType = cryptoType; return Encrypt(inputText); }
/// <summary> /// Encrypt string acc. to cryptoType and with user defined password /// </summary> /// <param name="inputText">text to encrypt</param> /// <param name="password">password to use when encrypting</param> /// <param name="cryptoType">type of encryption</param> /// <returns>an encrypted string</returns> internal string Encrypt(string inputText, string password, CryptoTypes cryptoType) { mCryptoType = cryptoType; return this.Encrypt(inputText, password); }
public CryptoHelper(CryptoTypes CryptoType) { this.CryptoType = CryptoType; calculateNewKeyAndIV(); }
public EncryptionServices(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
/// <summary> /// Encrypt string acc. to cryptoType and with user defined password /// </summary> /// <param name="inputText">text to encrypt</param> /// <param name="password">password to use when encrypting</param> /// <param name="cryptoType">type of encryption</param> /// <returns>an encrypted string</returns> internal string Encrypt(string inputText, string password, CryptoTypes cryptoType) { mCryptoType = cryptoType; return(this.Encrypt(inputText, password)); }
/// <summary> /// Encrypt string acc. to cryptoType /// </summary> /// <param name="inputText">text to encrypt</param> /// <param name="cryptoType">type of encryption</param> /// <returns>an encrypted string</returns> internal string Encrypt(string inputText, CryptoTypes cryptoType) { this.CryptoType = cryptoType; return(this.Encrypt(inputText)); }
public CryptoService(CryptoTypes cryptoType) : this() { this.CryptoType = cryptoType; }
/// <summary> /// Encrypt string acc. to cryptoType /// </summary> /// <param name="inputText">text to encrypt</param> /// <param name="cryptoType">type of encryption</param> /// <returns>an encrypted string</returns> public string Encrypt(string inputText, CryptoTypes cryptoType) { CryptoType = cryptoType; return(Encrypt(inputText)); }
public static CryptoService Create(CryptoTypes type) { return(new CryptoService(type)); }
public VNPTCrypto(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
public Encryption(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
/// <summary> /// decrypts a string acc. to the decryption type /// </summary> /// <param name="inputText">string to decrypt</param> /// <param name="cryptoType">type of decryption</param> /// <returns>a decrypted string</returns> public string Decrypt(string inputText, CryptoTypes cryptoType) { this.CryptoType = cryptoType; return(Decrypt(inputText)); }
public static CryptoTool Create(CryptoTypes type) { return(new CryptoTool(type)); }
public LVCrypto(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
internal CryptoTool(CryptoTypes cryptoType) { this.CryptoType = cryptoType; }
/// <summary> /// 생성자(암/복호화 타입을 지정) /// </summary> /// <param name="CryptoType"></param> public CryptoService(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
public string Decrypt(string inputText, string password, CryptoTypes cryptoType) { this.mCryptoType = cryptoType; this.Password = password; return(Decrypt(inputText)); }
public Crypto(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
public Cryptography(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
public CryptoHelper(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
public Crypto(CryptoTypes CryptoType, bool compatible) { mCompactCompatible = compatible; this.CryptoType = CryptoType; }
/// <summary> /// Encrypt string acc. to cryptoType /// </summary> /// <param name="inputText">text to encrypt</param> /// <param name="cryptoType">type of encryption</param> /// <returns>an encrypted string</returns> internal string Encrypt(string inputText, CryptoTypes cryptoType) { this.CryptoType = cryptoType; return this.Encrypt(inputText); }
public string Encrypt(string inputText, string password, CryptoTypes cryptoType) { mCryptoType = cryptoType; Password = password; return(Encrypt(inputText)); }
/// <summary> /// decrypts a string acc. to decryption type and user defined password key /// </summary> /// <param name="inputText">string to decrypt</param> /// <param name="password">password key used to decrypt</param> /// <param name="cryptoType">type of decryption</param> /// <returns>a decrypted string</returns> public string Decrypt(string inputText, string password, CryptoTypes cryptoType) { mCryptoType = cryptoType; return Decrypt(inputText,password); }
/// <summary> /// decrypts a string usi decryption type with user defined key /// </summary> /// <param name="inputText">string to decrypt</param> /// <param name="secretKey">key key used to decrypt</param> /// <param name="cryptoType">type of decryption</param> /// <returns>a decrypted string</returns> public string Decrypt(string inputText, string secretKey, CryptoTypes cryptoType) { mCryptoType = cryptoType; return(Decrypt(inputText, secretKey)); }
public Security(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
public GMCSecurity(CryptoTypes CryptoType) { this.CryptoType = CryptoType; }
/// <summary> /// decrypts a string acc. to decryption type and user defined password key /// </summary> /// <param name="inputText">string to decrypt</param> /// <param name="password">password key used to decrypt</param> /// <param name="cryptoType">type of decryption</param> /// <returns>a decrypted string</returns> public string Decrypt(string inputText, string password, CryptoTypes cryptoType) { mCryptoType = cryptoType; return(Decrypt(inputText, password)); }
public string Encrypt(string inputText, string password, CryptoTypes cryptoType) { this.mCryptoType = cryptoType; return this.Encrypt(inputText, password); }