final byte[] uniqueCardData =
new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09, 0x0a, 0x0b };
// Convert byte array to long.
final SHA1Digest digest = new SHA1Digest();
digest.update(uniqueCardData);
final long idLong =
byteArrayToLong(Arrays.copy(digest.getDigest(), 0, 8));
// Using friendly display name.
return new SmartCardID(idLong, ID_STRING, getSmartCard());
}