Class BCElGamalPrivateKey
java.lang.Object
org.bouncycastle.jcajce.provider.asymmetric.elgamal.BCElGamalPrivateKey
- All Implemented Interfaces:
Serializable,Key,PrivateKey,DHKey,DHPrivateKey,Destroyable,ElGamalKey,ElGamalPrivateKey,PKCS12BagAttributeCarrier
public class BCElGamalPrivateKey
extends Object
implements ElGamalPrivateKey, DHPrivateKey, PKCS12BagAttributeCarrier
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]Return a PKCS8 representation of the key.return the encoding format we produce in getEncoded().getX()booleaninthashCode()voidsetBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute) voidsetFriendlyName(String friendlyName) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
BCElGamalPrivateKey
protected BCElGamalPrivateKey()
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
return the encoding format we produce in getEncoded(). -
getEncoded
public byte[] getEncoded()Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.- Specified by:
getEncodedin interfaceKey- Returns:
- a PKCS8 representation of the key.
-
getParameters
- Specified by:
getParametersin interfaceElGamalKey
-
getParams
-
getX
- Specified by:
getXin interfaceDHPrivateKey- Specified by:
getXin interfaceElGamalPrivateKey
-
equals
-
hashCode
public int hashCode() -
setBagAttribute
- Specified by:
setBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttribute
- Specified by:
getBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
- Specified by:
getBagAttributeKeysin interfacePKCS12BagAttributeCarrier
-
hasFriendlyName
public boolean hasFriendlyName()- Specified by:
hasFriendlyNamein interfacePKCS12BagAttributeCarrier
-
setFriendlyName
- Specified by:
setFriendlyNamein interfacePKCS12BagAttributeCarrier
-