public class BCGOST3410PrivateKey extends java.lang.Object implements GOST3410PrivateKey, javax.security.auth.Destroyable, PKCS12BagAttributeCarrier
| Modifier | Constructor and Description |
|---|---|
protected |
BCGOST3410PrivateKey() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy this key, clearing the key material it holds.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAlgorithm() |
ASN1Encodable |
getBagAttribute(ASN1ObjectIdentifier oid) |
java.util.Enumeration |
getBagAttributeKeys() |
byte[] |
getEncoded()
Return a PKCS8 representation of the key.
|
java.lang.String |
getFormat()
return the encoding format we produce in getEncoded().
|
GOST3410Params |
getParameters() |
java.math.BigInteger |
getX() |
boolean |
hasFriendlyName() |
int |
hashCode() |
boolean |
isDestroyed() |
void |
setBagAttribute(ASN1ObjectIdentifier oid,
ASN1Encodable attribute) |
void |
setFriendlyName(java.lang.String friendlyName) |
java.lang.String |
toString() |
public java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic byte[] getEncoded()
getEncoded in interface java.security.Keypublic GOST3410Params getParameters()
getParameters in interface GOST3410Keypublic java.math.BigInteger getX()
getX in interface GOST3410PrivateKeypublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void destroy()
The private value is held as a BigInteger, which is immutable and so cannot be
zeroized in place - destruction drops the internal reference so the value becomes
unreachable (cleared on garbage collection). The (public) domain parameters are
retained. After destruction isDestroyed() returns true, the secret-bearing
accessors (getEncoded() and getX()) throw IllegalStateException, the key can no longer be
serialized, and it is equal only to itself; hashCode() retains its
pre-destruction value.
destroy in interface javax.security.auth.Destroyablepublic boolean isDestroyed()
isDestroyed in interface javax.security.auth.Destroyablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
setBagAttribute in interface PKCS12BagAttributeCarrierpublic ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)
getBagAttribute in interface PKCS12BagAttributeCarrierpublic java.util.Enumeration getBagAttributeKeys()
getBagAttributeKeys in interface PKCS12BagAttributeCarrierpublic boolean hasFriendlyName()
hasFriendlyName in interface PKCS12BagAttributeCarrierpublic void setFriendlyName(java.lang.String friendlyName)
setFriendlyName in interface PKCS12BagAttributeCarrier