public class CryptoCertumCard extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
CryptoCertumCard.Certificate |
class |
CryptoCertumCard.Entry
An entry on the card (key or certificate).
|
class |
CryptoCertumCard.Key |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
aliases()
Return the name of the keys available on the card.
|
static CryptoCertumCard |
getCard()
Get the CryptoCertum card.
|
CryptoCertumCard.Certificate |
getCertificate(String name)
Return the certificate with the specified name.
|
byte[] |
getChallenge(int length)
Get a challenge from the card.
|
List<CryptoCertumCard.Entry> |
getEntries()
Return the list of keys and certificates available on the card.
|
byte[] |
getFile(int fid)
Get a file from the card.
|
byte[] |
getFile(int fid,
boolean partial)
Get a file from the card.
|
CryptoCertumCard.Key |
getKey(String name)
Return the key with the specified name.
|
byte[] |
getKeyData(int keyref)
Return the public key data (modulus for RSA keys)
|
byte[] |
sign(CryptoCertumCard.Key key,
byte[] hash)
Sign the specified hash with the specified key.
|
void |
verify(int p1,
int p2,
String pin)
Verify the PIN required for the protected operations.
|
void |
verify(String pin)
Set the PIN for the verify operation.
|
public List<String> aliases() throws javax.smartcardio.CardException
javax.smartcardio.CardExceptionpublic static CryptoCertumCard getCard() throws javax.smartcardio.CardException
javax.smartcardio.CardExceptionpublic CryptoCertumCard.Certificate getCertificate(String name) throws javax.smartcardio.CardException
javax.smartcardio.CardExceptionpublic byte[] getChallenge(int length) throws javax.smartcardio.CardException
length - the length of the challenge in bytes (8 or 16)javax.smartcardio.CardExceptionpublic List<CryptoCertumCard.Entry> getEntries() throws javax.smartcardio.CardException
javax.smartcardio.CardExceptionpublic byte[] getFile(int fid) throws javax.smartcardio.CardException
fid - the identifier of the filejavax.smartcardio.CardExceptionpublic byte[] getFile(int fid, boolean partial) throws javax.smartcardio.CardException
fid - the identifier of the filepartial - if true, return only the first 256 bytes of the filejavax.smartcardio.CardExceptionpublic CryptoCertumCard.Key getKey(String name) throws javax.smartcardio.CardException
javax.smartcardio.CardExceptionpublic byte[] getKeyData(int keyref) throws javax.smartcardio.CardException
keyref - the reference of the keyjavax.smartcardio.CardExceptionpublic byte[] sign(CryptoCertumCard.Key key, byte[] hash) throws javax.smartcardio.CardException
key - the key to use for signinghash - the hash to signjavax.smartcardio.CardExceptionpublic void verify(int p1, int p2, String pin) throws javax.smartcardio.CardException
p1 - 0x00: verify, 0xFF: resetp2 - 0x83: PIN, 0x84: PUKpin - the PINjavax.smartcardio.CardExceptionCopyright © 2012–2025. All rights reserved.