public async Task <string> CreateQrCode(string Id) { string secretkey = Environment.GetEnvironmentVariable("ENCRYPTION_QRCODE"); var encryptedId = _cipher.Encryption(secretkey, Id); Bitmap qrCodeImage = GenerateQrCode(encryptedId); string qRCodeUrl = await UploadFileAsync(qrCodeImage, Id); return(qRCodeUrl); }
public async Task <string> CreateQrCode(string Id) { var secretkey = _env.EncryptionQrCode; var encryptedId = _cipher.Encryption(secretkey, Id); var qrCodeImage = GenerateQrCode(encryptedId); var qRCodeUrl = await UploadFileAsync(qrCodeImage, Id); return(qRCodeUrl); }
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 Encryption_GivenKeyAndString_ReturnsEncryptedString() { //Given //When //Then string result = _cipher.Encryption(_key, _normalString); Assert.Equal(_encryptedString, result); }