public static PlainText Decrypt(this string textToEncrypt) { var encryptionKey = AppInstance.Instance.ApiAssets[Constants.ASSET_ADMIN_ENCRYPTIONKEY]; var encryptedText = new EncryptedText(textToEncrypt); return(encryptedText.Decrypt(encryptionKey)); }
public static PlainText Decrypt(this EncryptedText encryptedText, string encryptionKey) { var decryptedText = Crypto.Decrypt(encryptedText.Value, encryptionKey); return(new PlainText(decryptedText)); }