/// <summary> /// PinPadCryptographyMethodController string parser. /// </summary> /// <param name="reader">String reader.</param> /// <returns>PinPadCryptographyMethodController</returns> public static CryptographyMethod CustomStringParser(StringReader reader) { int intValue = StringParser.IntegerStringParser(reader, 1).Value; int keyManagementMethodValue = (intValue / 2) + 1; KeyManagementMode keyManagementMethod = (KeyManagementMode)keyManagementMethodValue; int cryptographyMethodValue = (intValue % 2) + 1; CryptographyMode cryptographyMethod = (CryptographyMode)cryptographyMethodValue; CryptographyMethod value = new CryptographyMethod(keyManagementMethod, cryptographyMethod); return(value); }
/// <summary> /// Constructor with initial value. /// </summary> /// <param name="keyManagement">Online Pin Cryptography Key Management Mode.</param> /// <param name="cryptography">Online Pin Cryptography Mode.</param> public CryptographyMethod(KeyManagementMode keyManagement, CryptographyMode cryptography) : this() { this.KeyManagement = keyManagement; this.Cryptography = cryptography; }