public class BACKey extends Object implements BACKeySpec
Modifier | Constructor and Description |
---|---|
protected |
BACKey()
Creates an empty BAC key entry.
|
|
BACKey(String documentNumber,
Date dateOfBirth,
Date dateOfExpiry)
Creates a BAC key.
|
|
BACKey(String documentNumber,
String dateOfBirth,
String dateOfExpiry)
Creates a BAC key.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Tests equality of this BAC key with respect to another object.
|
String |
getAlgorithm()
The algorithm of this key specification.
|
String |
getDateOfBirth()
Returns the date of birth string.
|
String |
getDateOfExpiry()
Returns the date of expiry string.
|
String |
getDocumentNumber()
Returns the document number string.
|
byte[] |
getKey()
Returns the encoded key (key seed) for use in key derivation.
|
int |
hashCode()
Computes the hash code of this BAC key.
|
protected void |
setDateOfBirth(String dateOfBirth)
Sets the date of birth.
|
protected void |
setDateOfExpiry(String dateOfExpiry)
Sets the date of expiry.
|
protected void |
setDocumentNumber(String documentNumber)
Sets the document number.
|
String |
toString()
Returns a textual representation of this BAC key.
|
protected BACKey()
public BACKey(String documentNumber, Date dateOfBirth, Date dateOfExpiry)
documentNumber
- the document number string, withou check digit, cannot be null
, and may be shorter than 9dateOfBirth
- the date of birth, in yymmdd format, cannot be null
dateOfExpiry
- the date of expiry, in yymmdd format, cannot be null
public BACKey(String documentNumber, String dateOfBirth, String dateOfExpiry)
documentNumber
- the document number string, cannot be null
dateOfBirth
- the date of birth string in yymmdd format, cannot be null
dateOfExpiry
- the date of expiry string in yymmdd format, cannot be null
public String getDocumentNumber()
getDocumentNumber
in interface BACKeySpec
public String getDateOfBirth()
getDateOfBirth
in interface BACKeySpec
public String getDateOfExpiry()
getDateOfExpiry
in interface BACKeySpec
public String toString()
public int hashCode()
public boolean equals(Object o)
public String getAlgorithm()
getAlgorithm
in interface AccessKeySpec
public byte[] getKey()
getKey
in interface AccessKeySpec
protected void setDocumentNumber(String documentNumber)
documentNumber
- the document number to setprotected void setDateOfBirth(String dateOfBirth)
dateOfBirth
- the date of birth to setprotected void setDateOfExpiry(String dateOfExpiry)
dateOfExpiry
- the date of expiry to setCopyright © 2020. All rights reserved.