public abstract class P11Identity extends Object
| Modifier and Type | Field and Description |
|---|---|
protected P11IdentityId |
id |
protected P11Slot |
slot |
| Modifier | Constructor and Description |
|---|---|
protected |
P11Identity(P11Slot slot,
P11IdentityId id) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
destroy() |
byte[] |
digestSecretKey(long mechanism) |
protected abstract byte[] |
digestSecretKey0(long mechanism) |
BigInteger |
getDsaQ() |
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getEcParams() |
P11IdentityId |
getId() |
long |
getKeyType() |
PublicKey |
getPublicKey() |
BigInteger |
getRsaModulus() |
BigInteger |
getRsaPublicExponent() |
boolean |
isSecretKey() |
void |
setDsaQ(BigInteger q) |
void |
setEcParams(org.bouncycastle.asn1.ASN1ObjectIdentifier ecParams) |
void |
setRsaMParameters(BigInteger modulus,
BigInteger publicExponent) |
byte[] |
sign(long mechanism,
P11Params parameters,
byte[] content) |
protected abstract byte[] |
sign0(long mechanism,
P11Params parameters,
byte[] content)
Signs the content.
|
boolean |
supportsMechanism(long mechanism) |
boolean |
supportsMechanism(long mechanism,
P11Params parameters) |
protected final P11Slot slot
protected final P11IdentityId id
protected P11Identity(P11Slot slot, P11IdentityId id)
public abstract void destroy()
throws org.xipki.pkcs11.wrapper.TokenException
org.xipki.pkcs11.wrapper.TokenExceptionpublic org.bouncycastle.asn1.ASN1ObjectIdentifier getEcParams()
public void setEcParams(org.bouncycastle.asn1.ASN1ObjectIdentifier ecParams)
public BigInteger getRsaModulus()
public BigInteger getRsaPublicExponent()
public void setRsaMParameters(BigInteger modulus, BigInteger publicExponent)
public BigInteger getDsaQ()
public void setDsaQ(BigInteger q)
public byte[] sign(long mechanism,
P11Params parameters,
byte[] content)
throws org.xipki.pkcs11.wrapper.TokenException
org.xipki.pkcs11.wrapper.TokenExceptionprotected abstract byte[] sign0(long mechanism,
P11Params parameters,
byte[] content)
throws org.xipki.pkcs11.wrapper.TokenException
mechanism - mechanism to sign the content.parameters - Parameters. Could be null.content - Content to be signed. Must not be null.org.xipki.pkcs11.wrapper.TokenException - if PKCS#11 token error occurs.public byte[] digestSecretKey(long mechanism)
throws org.xipki.pkcs11.wrapper.TokenException,
XiSecurityException
org.xipki.pkcs11.wrapper.TokenExceptionXiSecurityExceptionprotected abstract byte[] digestSecretKey0(long mechanism)
throws org.xipki.pkcs11.wrapper.TokenException
org.xipki.pkcs11.wrapper.TokenExceptionpublic P11IdentityId getId()
public long getKeyType()
public boolean isSecretKey()
public final PublicKey getPublicKey()
public boolean supportsMechanism(long mechanism)
public boolean supportsMechanism(long mechanism,
P11Params parameters)
Copyright © 2023. All rights reserved.