public class AtikKG extends java.lang.Object implements IPKCS11Ops
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
FS |
protected int |
KEY_SIZE_2048 |
protected static java.lang.String |
LIBNAME |
protected static org.slf4j.Logger |
logger |
static int |
RSA_2048 |
protected static int |
SUCCESS |
| Constructor and Description |
|---|
AtikKG() |
| Modifier and Type | Method and Description |
|---|---|
void |
changeLabel(long aSessionId,
java.lang.String aOldLabel,
java.lang.String aNewLabel) |
void |
changePassword(java.lang.String aOldPass,
java.lang.String aNewPass,
long aSessionID) |
void |
changeUserPin(byte[] aSOPin,
byte[] aUserPin,
long aSessionHandle) |
void |
closeSession(long aSessionID) |
java.security.spec.KeySpec |
createKeyPair(long aSessionID,
KeyPairTemplate template) |
void |
createKeyPair(long aSessionID,
java.lang.String aKeyLabel,
java.security.spec.AlgorithmParameterSpec aParamSpec,
boolean aIsSign,
boolean aIsEncrypt) |
void |
createSecretKey(long aSessionId,
SecretKey aKey) |
void |
createSecretKey(long sessionID,
SecretKeyTemplate template) |
byte[] |
decryptData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
byte[] |
decryptDataWithCertSerialNo(long aSessionID,
byte[] aSerialNumber,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aData) |
int |
deleteCertificate(long aSessionID,
java.lang.String aKeyLabel) |
void |
deletePrivateData(long aSessionID,
java.lang.String aLabel) |
void |
deletePrivateObject(long aSessionID,
java.lang.String aLabel) |
void |
deletePublicData(long aSessionID,
java.lang.String aLabel) |
void |
deletePublicObject(long aSessionID,
java.lang.String aLabel) |
byte[] |
encryptData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
void |
formatToken(java.lang.String aSOpin,
java.lang.String aNewPIN,
java.lang.String aLabel,
int slotID) |
java.security.KeyPair |
generateECKeyPair(long aSessionID,
java.security.spec.ECParameterSpec ecParameterSpec) |
byte[] |
generateRSAPrivateKey(long aSessionID,
int keySize) |
void |
getAttributeValue(long aSessionID,
long aObjectID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) |
java.util.List<byte[]> |
getCertificates(long aSessionID) |
java.util.List<byte[]> |
getEncryptionCertificates(long aSessionID) |
java.lang.String[] |
getEncryptionKeyLabels(long aSessionID) |
long[] |
getMechanismList(long aSlotID) |
byte[] |
getModulusOfKey(long aSessionID,
long aObjID) |
long |
getObjIDFromPrivateKeyLabel(long aSessionID,
java.lang.String aLabel) |
long |
getObjIDFromPublicKeyLabel(long aSessionID,
java.lang.String aLabel) |
long |
getPrivateKeyObjIDFromCertificateSerial(long aSessionID,
byte[] aCertSerialNo) |
byte[] |
getRandomData(long aSessionID,
int aDataLength) |
sun.security.pkcs11.wrapper.CK_SESSION_INFO |
getSessionInfo(long aSessionID) |
java.util.List<byte[]> |
getSignatureCertificates(long aSessionID) |
java.lang.String[] |
getSignatureKeyLabels(long aSessionID) |
sun.security.pkcs11.wrapper.CK_SLOT_INFO |
getSlotInfo(long aSlotID) |
long[] |
getSlotList() |
sun.security.pkcs11.wrapper.CK_TOKEN_INFO |
getTokenInfo(long aSlotID) |
long[] |
getTokenPresentSlotList() |
java.util.List<tr.gov.tubitak.uekae.esya.api.common.util.bag.Pair<java.lang.Long,java.lang.String>> |
getTokenPresentSlotListWithDescription() |
byte[] |
getTokenSerialNo(long aSlotID) |
java.lang.String[] |
getUnwrapperKeyLabels(long aSessionID) |
java.lang.String[] |
getWrapperKeyLabels(long aSessionID) |
void |
importCertificate(long aSessionID,
java.lang.String aCertLabel,
java.security.cert.X509Certificate aSertifika) |
void |
importCertificateAndKey(long aSessionID,
java.lang.String aCertLabel,
java.lang.String aKeyLabel,
java.security.PrivateKey aPrivKey,
java.security.cert.X509Certificate aCert) |
boolean |
importCertificateAndKeyWithCSP(byte[] aAnahtarCifti,
int aAnahtarLen,
java.lang.String aScfname,
java.lang.String aContextName,
byte[] aPbCertData,
int aSignOrEnc) |
boolean |
importCertificateAndKeyWithCSP(byte[] aAnahtarCifti,
int aAnahtarLen,
java.lang.String aScfname,
java.lang.String aContextName,
java.security.cert.X509Certificate aPbCertData,
int aSignOrEnc) |
void |
importKeyPair(long sessionID,
KeyPairTemplate template) |
void |
importKeyPair(long aSessionID,
java.lang.String aLabel,
java.security.KeyPair aPrivKey,
byte[] aSubject,
boolean aIsSign,
boolean aIsEncrypt) |
void |
importRSAPublicKey(long aSessionID,
java.lang.String aLabel,
java.security.interfaces.RSAPublicKey publicKey,
boolean aIsSign,
boolean aIsEncrypt) |
void |
importSecretKey(long aSessionId,
SecretKey aKey) |
void |
importSecretKey(long aSessionId,
SecretKeyTemplate aKey) |
void |
importWrappingRSAPublicKey(long aSessionID,
java.lang.String aLabel,
java.security.interfaces.RSAPublicKey publicKey) |
void |
initialize() |
boolean |
isAnyObjectExist(long aSessionID) |
boolean |
isCertificateExist(long aSessionID,
java.lang.String aLabel) |
boolean |
isObjectExist(long aSessionID,
java.lang.String aLabel) |
boolean |
isPrivateKeyExist(long aSessionID,
java.lang.String aLabel) |
boolean |
isPublicKeyExist(long aSessionID,
java.lang.String aLabel) |
boolean |
isTokenPresent(long aSlotID) |
void |
login(long aSessionID,
java.lang.String aCardPIN) |
void |
logout(long aSessionID) |
long[] |
objeAra(long aSessionID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) |
long |
openSession(long aSlotID) |
byte[] |
readCertificate(long aSessionID,
byte[] aCertSerialNo) |
java.util.List<byte[]> |
readCertificate(long aSessionID,
java.lang.String aLabel) |
java.util.List<byte[]> |
readPrivateData(long aSessionID,
java.lang.String aLabel) |
java.util.List<byte[]> |
readPublicData(long aSessionID,
java.lang.String aLabel) |
java.security.spec.KeySpec |
readPublicKeySpec(long aSessionID,
byte[] aCertSerialNo) |
java.security.spec.KeySpec |
readPublicKeySpec(long aSessionID,
java.lang.String aLabel) |
boolean |
setContainer(byte[] aContainerLabel,
long aSessionHandle) |
void |
setSOPin(byte[] aSOPin,
byte[] aNewSOPin,
long aSessionHandle) |
byte[] |
signAndRecoverData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aImzalanacak,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
byte[] |
signData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aImzalanacak,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
byte[] |
signDataWithCertSerialNo(long aSessionID,
byte[] aSerialNumber,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aImzalanacak) |
byte[] |
signDataWithKeyID(long aSessionID,
long aKeyID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aImzalanacak) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] certSerialNumber,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
KeyTemplate unwrapperKeyTemplate,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String aUnwrappingKeyLabel,
byte[] aWrappedKey,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aUnwrappedKeyTemplate) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String aUnwrappingKeyLabel,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate) |
void |
updatePrivateData(long aSessionID,
java.lang.String aLabel,
byte[] aValue) |
void |
updatePublicData(long aSessionID,
java.lang.String aLabel,
byte[] aValue) |
byte[] |
verifyAndRecoverData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aSignature,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
void |
verifyData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
byte[] aImza,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
void |
verifyData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
byte[] aImza,
long aMechanism) |
byte[] |
wrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
KeyTemplate wrapperKeyFacade,
KeyTemplate keyFacade) |
byte[] |
wrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String aWrappingKeyLabel,
java.lang.String aKeyLabel) |
void |
writePrivateData(long aSessionID,
java.lang.String aLabel,
byte[] aData) |
void |
writePublicData(long aSessionID,
java.lang.String aLabel,
byte[] aData) |
protected static org.slf4j.Logger logger
public static final int RSA_2048
protected static final java.lang.String LIBNAME
protected int KEY_SIZE_2048
protected static int SUCCESS
protected static final java.lang.String FS
public byte[] generateRSAPrivateKey(long aSessionID,
int keySize)
throws tr.gov.tubitak.uekae.esya.api.common.ESYAException
generateRSAPrivateKey in interface IPKCS11Opstr.gov.tubitak.uekae.esya.api.common.ESYAExceptionpublic java.security.KeyPair generateECKeyPair(long aSessionID,
java.security.spec.ECParameterSpec ecParameterSpec)
throws tr.gov.tubitak.uekae.esya.api.common.ESYAException
generateECKeyPair in interface IPKCS11Opstr.gov.tubitak.uekae.esya.api.common.ESYAExceptionpublic long[] getTokenPresentSlotList()
throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenPresentSlotList in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic java.util.List<tr.gov.tubitak.uekae.esya.api.common.util.bag.Pair<java.lang.Long,java.lang.String>> getTokenPresentSlotListWithDescription()
throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenPresentSlotListWithDescription in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void initialize()
throws sun.security.pkcs11.wrapper.PKCS11Exception,
java.io.IOException
initialize in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionjava.io.IOExceptionpublic long[] getSlotList()
throws sun.security.pkcs11.wrapper.PKCS11Exception
getSlotList in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic sun.security.pkcs11.wrapper.CK_SLOT_INFO getSlotInfo(long aSlotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getSlotInfo in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic boolean isTokenPresent(long aSlotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
isTokenPresent in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic sun.security.pkcs11.wrapper.CK_TOKEN_INFO getTokenInfo(long aSlotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenInfo in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic sun.security.pkcs11.wrapper.CK_SESSION_INFO getSessionInfo(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getSessionInfo in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic long[] getMechanismList(long aSlotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getMechanismList in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic long openSession(long aSlotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
openSession in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void closeSession(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
closeSession in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void login(long aSessionID,
java.lang.String aCardPIN)
throws sun.security.pkcs11.wrapper.PKCS11Exception
login in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void logout(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
logout in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic boolean isAnyObjectExist(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
isAnyObjectExist in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void importCertificate(long aSessionID,
java.lang.String aCertLabel,
java.security.cert.X509Certificate aSertifika)
throws sun.security.pkcs11.wrapper.PKCS11Exception
importCertificate in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void createKeyPair(long aSessionID,
java.lang.String aKeyLabel,
java.security.spec.AlgorithmParameterSpec aParamSpec,
boolean aIsSign,
boolean aIsEncrypt)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
java.io.IOException,
SmartCardException
createKeyPair in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionjava.io.IOExceptionSmartCardExceptionpublic java.security.spec.KeySpec createKeyPair(long aSessionID,
KeyPairTemplate template)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
java.io.IOException,
SmartCardException
createKeyPair in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionjava.io.IOExceptionSmartCardExceptionpublic byte[] signDataWithCertSerialNo(long aSessionID,
byte[] aSerialNumber,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aImzalanacak)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
signDataWithCertSerialNo in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] decryptDataWithCertSerialNo(long aSessionID,
byte[] aSerialNumber,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aData)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
decryptDataWithCertSerialNo in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.util.List<byte[]> getCertificates(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getCertificates in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.util.List<byte[]> getSignatureCertificates(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getSignatureCertificates in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.util.List<byte[]> getEncryptionCertificates(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getEncryptionCertificates in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.lang.String[] getSignatureKeyLabels(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getSignatureKeyLabels in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.lang.String[] getEncryptionKeyLabels(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getEncryptionKeyLabels in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic boolean isObjectExist(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception
isObjectExist in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void writePrivateData(long aSessionID,
java.lang.String aLabel,
byte[] aData)
throws sun.security.pkcs11.wrapper.PKCS11Exception
writePrivateData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void writePublicData(long aSessionID,
java.lang.String aLabel,
byte[] aData)
throws sun.security.pkcs11.wrapper.PKCS11Exception
writePublicData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic java.util.List<byte[]> readPrivateData(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
readPrivateData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.util.List<byte[]> readPublicData(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
readPublicData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.util.List<byte[]> readCertificate(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
readCertificate in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] readCertificate(long aSessionID,
byte[] aCertSerialNo)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
readCertificate in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.security.spec.KeySpec readPublicKeySpec(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
readPublicKeySpec in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void updatePrivateData(long aSessionID,
java.lang.String aLabel,
byte[] aValue)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
updatePrivateData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void updatePublicData(long aSessionID,
java.lang.String aLabel,
byte[] aValue)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
updatePublicData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void deletePrivateObject(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
deletePrivateObject in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void deletePublicObject(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
deletePublicObject in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void deletePrivateData(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
deletePrivateData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void deletePublicData(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
deletePublicData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] getRandomData(long aSessionID,
int aDataLength)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getRandomData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic byte[] getTokenSerialNo(long aSlotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenSerialNo in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic byte[] signData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aImzalanacak,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
signData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] signAndRecoverData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aImzalanacak,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
signAndRecoverData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] verifyAndRecoverData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aSignature,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
verifyAndRecoverData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void verifyData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
byte[] aImza,
long aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
verifyData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void verifyData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
byte[] aImza,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
verifyData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] encryptData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
encryptData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] decryptData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
decryptData in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void importCertificateAndKey(long aSessionID,
java.lang.String aCertLabel,
java.lang.String aKeyLabel,
java.security.PrivateKey aPrivKey,
java.security.cert.X509Certificate aCert)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
java.io.IOException,
SmartCardException
importCertificateAndKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionjava.io.IOExceptionSmartCardExceptionpublic void changePassword(java.lang.String aOldPass,
java.lang.String aNewPass,
long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
changePassword in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void formatToken(java.lang.String aSOpin,
java.lang.String aNewPIN,
java.lang.String aLabel,
int slotID)
throws sun.security.pkcs11.wrapper.PKCS11Exception
formatToken in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void setSOPin(byte[] aSOPin,
byte[] aNewSOPin,
long aSessionHandle)
throws sun.security.pkcs11.wrapper.PKCS11Exception
setSOPin in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void changeUserPin(byte[] aSOPin,
byte[] aUserPin,
long aSessionHandle)
throws sun.security.pkcs11.wrapper.PKCS11Exception
changeUserPin in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic boolean setContainer(byte[] aContainerLabel,
long aSessionHandle)
setContainer in interface IPKCS11Opspublic boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti,
int aAnahtarLen,
java.lang.String aScfname,
java.lang.String aContextName,
java.security.cert.X509Certificate aPbCertData,
int aSignOrEnc)
importCertificateAndKeyWithCSP in interface IPKCS11Opspublic boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti,
int aAnahtarLen,
java.lang.String aScfname,
java.lang.String aContextName,
byte[] aPbCertData,
int aSignOrEnc)
importCertificateAndKeyWithCSP in interface IPKCS11Opspublic boolean isPrivateKeyExist(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception
isPrivateKeyExist in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic boolean isPublicKeyExist(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception
isPublicKeyExist in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic boolean isCertificateExist(long aSessionID,
java.lang.String aLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception
isCertificateExist in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void importKeyPair(long aSessionID,
java.lang.String aLabel,
java.security.KeyPair aPrivKey,
byte[] aSubject,
boolean aIsSign,
boolean aIsEncrypt)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException,
java.io.IOException
importKeyPair in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionjava.io.IOExceptionpublic void createSecretKey(long aSessionId,
SecretKey aKey)
throws sun.security.pkcs11.wrapper.PKCS11Exception
createSecretKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void importSecretKey(long aSessionId,
SecretKey aKey)
throws sun.security.pkcs11.wrapper.PKCS11Exception
importSecretKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void importSecretKey(long aSessionId,
SecretKeyTemplate aKey)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
importSecretKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.security.spec.KeySpec readPublicKeySpec(long aSessionID,
byte[] aCertSerialNo)
throws SmartCardException,
sun.security.pkcs11.wrapper.PKCS11Exception
readPublicKeySpec in interface IPKCS11OpsSmartCardExceptionsun.security.pkcs11.wrapper.PKCS11Exceptionpublic long[] objeAra(long aSessionID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate)
throws sun.security.pkcs11.wrapper.PKCS11Exception
objeAra in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic void getAttributeValue(long aSessionID,
long aObjectID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate)
throws sun.security.pkcs11.wrapper.PKCS11Exception
getAttributeValue in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic byte[] wrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String aWrappingKeyLabel,
java.lang.String aKeyLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
wrapKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String aUnwrappingKeyLabel,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
unwrapKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String aUnwrappingKeyLabel,
byte[] aWrappedKey,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aUnwrappedKeyTemplate)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
sun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void importWrappingRSAPublicKey(long aSessionID,
java.lang.String aLabel,
java.security.interfaces.RSAPublicKey publicKey)
throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exceptionpublic void importRSAPublicKey(long aSessionID,
java.lang.String aLabel,
java.security.interfaces.RSAPublicKey publicKey,
boolean aIsSign,
boolean aIsEncrypt)
throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exceptionpublic void importKeyPair(long sessionID,
KeyPairTemplate template)
importKeyPair in interface IPKCS11Opspublic void createSecretKey(long sessionID,
SecretKeyTemplate template)
createSecretKey in interface IPKCS11Opspublic void unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] certSerialNumber,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
unwrapKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] getModulusOfKey(long aSessionID,
long aObjID)
throws SmartCardException,
sun.security.pkcs11.wrapper.PKCS11Exception
getModulusOfKey in interface IPKCS11OpsSmartCardExceptionsun.security.pkcs11.wrapper.PKCS11Exceptionpublic long getPrivateKeyObjIDFromCertificateSerial(long aSessionID,
byte[] aCertSerialNo)
throws SmartCardException,
sun.security.pkcs11.wrapper.PKCS11Exception
getPrivateKeyObjIDFromCertificateSerial in interface IPKCS11OpsSmartCardExceptionsun.security.pkcs11.wrapper.PKCS11Exceptionpublic long getObjIDFromPrivateKeyLabel(long aSessionID,
java.lang.String aLabel)
throws SmartCardException,
sun.security.pkcs11.wrapper.PKCS11Exception
getObjIDFromPrivateKeyLabel in interface IPKCS11OpsSmartCardExceptionsun.security.pkcs11.wrapper.PKCS11Exceptionpublic long getObjIDFromPublicKeyLabel(long aSessionID,
java.lang.String aLabel)
throws SmartCardException,
sun.security.pkcs11.wrapper.PKCS11Exception
getObjIDFromPublicKeyLabel in interface IPKCS11OpsSmartCardExceptionsun.security.pkcs11.wrapper.PKCS11Exceptionpublic void changeLabel(long aSessionId,
java.lang.String aOldLabel,
java.lang.String aNewLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
changeLabel in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] signDataWithKeyID(long aSessionID,
long aKeyID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aImzalanacak)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
signDataWithKeyID in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic byte[] wrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
KeyTemplate wrapperKeyFacade,
KeyTemplate keyFacade)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
wrapKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic void unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
KeyTemplate unwrapperKeyTemplate,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
unwrapKey in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic int deleteCertificate(long aSessionID,
java.lang.String aKeyLabel)
throws sun.security.pkcs11.wrapper.PKCS11Exception
deleteCertificate in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11Exceptionpublic java.lang.String[] getWrapperKeyLabels(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getWrapperKeyLabels in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionpublic java.lang.String[] getUnwrapperKeyLabels(long aSessionID)
throws sun.security.pkcs11.wrapper.PKCS11Exception,
SmartCardException
getUnwrapperKeyLabels in interface IPKCS11Opssun.security.pkcs11.wrapper.PKCS11ExceptionSmartCardExceptionCopyright © 2025. All rights reserved.