public string Cipher(string ExcelId) { string secretkey = Environment.GetEnvironmentVariable("ENCRYPTION_QRCODE"); string cipherText = _cipher.Encryption(secretkey, ExcelId); string id = _cipher.Decryption(secretkey, cipherText); return(secretkey + "\t" + cipherText + "\t" + id); }
public void Decryption_GivenKeyAndEncryptedString_ReturnsDecryptedString() { //Given //When //Then string result = _cipher.Decryption(_key, _encryptedString); Assert.Equal(_normalString, result); }