@Test public void testSetAccountNumber() throws Throwable { byte[] pinBlock = new byte[3]; EncryptedPIN encryptedPIN = new EncryptedPIN(pinBlock, (byte) 0, "testEncryptedPINAccountNumber"); try { encryptedPIN.setAccountNumber("13CharactersX"); fail("Expected InvalidParameterException"); } catch (InvalidParameterException ignored) { } }
public void setAccountNumber (String extractedAccountNumber) { if(extractedAccountNumber.length() != 12) throw new InvalidParameterException( "Extracted account number length should be 12, got '" +ISOUtil.protect(extractedAccountNumber) + "'" ); this.accountNumber = extractedAccountNumber; }
EncryptedPIN implements Serializable, Loggeable { public void setAccountNumber (String extractedAccountNumber) { if(extractedAccountNumber.length() != 12) throw new InvalidParameterException( "Extracted account number length should be 12, got '" +ISOUtil.protect(extractedAccountNumber) + "'" ); this.accountNumber = extractedAccountNumber; } }
EncryptedPIN implements Serializable, Loggeable { public void setAccountNumber (String extractedAccountNumber) { if(extractedAccountNumber.length() != 12) throw new InvalidParameterException( "Extracted account number length should be 12, got '" +ISOUtil.protect(extractedAccountNumber) + "'" ); this.accountNumber = extractedAccountNumber; } EncryptedPIN();  EncryptedPIN(byte[] pinBlock, byte pinBlockFormat, String accountNumber);  EncryptedPIN(byte[] pinBlock, byte pinBlockFormat, String accountNumber, boolean extract);  EncryptedPIN(String pinBlockHexString, byte pinBlockFormat, String accountNumber);  EncryptedPIN(String pinBlockHexString, byte pinBlockFormat, String accountNumber, boolean extract); }
EncryptedPIN implements Serializable, Loggeable { public void setAccountNumber (String extractedAccountNumber) { if(extractedAccountNumber.length() != 12) throw new InvalidParameterException( "Extracted account number length should be 12, got '" +ISOUtil.protect(extractedAccountNumber) + "'" ); this.accountNumber = extractedAccountNumber; } EncryptedPIN();  EncryptedPIN(byte[] pinBlock, byte pinBlockFormat, String accountNumber);  EncryptedPIN(byte[] pinBlock, byte pinBlockFormat, String accountNumber, boolean extract);  EncryptedPIN(String pinBlockHexString, byte pinBlockFormat, String accountNumber);  EncryptedPIN(String pinBlockHexString, byte pinBlockFormat, String accountNumber, boolean extract); void dump(PrintStream p, String indent); void setPINBlock(byte[] pinBlock); byte[] getPINBlock(); void setPINBlockFormat(byte pinBlockFormat); byte getPINBlockFormat(); void setAccountNumber(String extractedAccountNumber); String getAccountNumber(); static String extractAccountNumberPart(String accountNumber); }
EncryptedPIN implements Serializable, Loggeable { public void setAccountNumber (String extractedAccountNumber) { if(extractedAccountNumber.length() != 12) throw new InvalidParameterException( "Extracted account number length should be 12, got '" +ISOUtil.protect(extractedAccountNumber) + "'" ); this.accountNumber = extractedAccountNumber; } EncryptedPIN();  EncryptedPIN(byte[] pinBlock, byte pinBlockFormat, String accountNumber);  EncryptedPIN(byte[] pinBlock, byte pinBlockFormat, String accountNumber, boolean extract);  EncryptedPIN(String pinBlockHexString, byte pinBlockFormat, String accountNumber);  EncryptedPIN(String pinBlockHexString, byte pinBlockFormat, String accountNumber, boolean extract); void dump(PrintStream p, String indent); void setPINBlock(byte[] pinBlock); byte[] getPINBlock(); void setPINBlockFormat(byte pinBlockFormat); byte getPINBlockFormat(); void setAccountNumber(String extractedAccountNumber); String getAccountNumber(); static String extractAccountNumberPart(String accountNumber);  }