public static Encrypted Parse(Response.Encrypted json) { return(new Encrypted(keyId: json.KeyId, scheme: json.Scheme, container: json.Container, iv: json.Iv?.Decode64Loose(), // This is optional ciphertext: json.Ciphertext.Decode64Loose())); }
internal static T Decrypt <T>(R.Encrypted encrypted, IDecryptor decryptor) { return(Decrypt <T>(Encrypted.Parse(encrypted), decryptor)); }
internal static void DecryptRsaKey(R.Encrypted encryptedRsaKey, Keychain keychain) { DecryptRsaKey(Encrypted.Parse(encryptedRsaKey), keychain); }