Class ElGamal
- java.lang.Object
-
- org.pgpainless.key.generation.type.elgamal.ElGamal
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEncryptCommunication()
Return true if the key that is generated from this type is able to carry the ENCRYPT_COMMS key flag.boolean
canSign()
Return true if the key that is generated from this type is able to carry the SIGN_DATA key flag.PublicKeyAlgorithm
getAlgorithm()
Return the public key algorithm.java.security.spec.AlgorithmParameterSpec
getAlgorithmSpec()
Return an implementation ofAlgorithmParameterSpec
that can be used to generate the key.java.lang.String
getName()
Return the encryption algorithm name.static ElGamal
withLength(ElGamalLength length)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pgpainless.key.generation.type.KeyType
canAuthenticate, canCertify, canEncryptStorage
-
-
-
-
Method Detail
-
withLength
public static ElGamal withLength(ElGamalLength length)
-
getName
public java.lang.String getName()
Description copied from interface:KeyType
Return the encryption algorithm name.
-
getAlgorithm
public PublicKeyAlgorithm getAlgorithm()
Description copied from interface:KeyType
Return the public key algorithm.- Specified by:
getAlgorithm
in interfaceKeyType
- Returns:
- public key algorithm
-
getAlgorithmSpec
public java.security.spec.AlgorithmParameterSpec getAlgorithmSpec()
Description copied from interface:KeyType
Return an implementation ofAlgorithmParameterSpec
that can be used to generate the key.- Specified by:
getAlgorithmSpec
in interfaceKeyType
- Returns:
- algorithm parameter spec
-
canSign
public boolean canSign()
Description copied from interface:KeyType
Return true if the key that is generated from this type is able to carry the SIGN_DATA key flag. SeeKeyFlag.SIGN_DATA
.
-
canEncryptCommunication
public boolean canEncryptCommunication()
Description copied from interface:KeyType
Return true if the key that is generated from this type is able to carry the ENCRYPT_COMMS key flag. SeeKeyFlag.ENCRYPT_COMMS
.- Specified by:
canEncryptCommunication
in interfaceKeyType
- Returns:
- true if the key can encrypt communication
-
-