1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-23 04:42:06 +01:00

Add more javadoc

This commit is contained in:
Paul Schaub 2020-12-11 18:53:10 +01:00
parent ac08827f91
commit c38477f277
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -28,12 +28,33 @@ import org.pgpainless.key.generation.type.rsa.RSA;
public interface KeyType {
/**
* Return the encryption algorithm name.
*
* @return algorithm name.
*/
String getName();
/**
* Return the public key algorithm.
*
* @return public key algorithm
*/
PublicKeyAlgorithm getAlgorithm();
/**
* Return an implementation of {@link AlgorithmParameterSpec} that can be used to generate the key.
*
* @return algorithm parameter spec
*/
AlgorithmParameterSpec getAlgorithmSpec();
/**
* Return true if the key that is generated from this type is able to carry the CERTIFY_OTHERS key flag.
* See {@link org.pgpainless.algorithm.KeyFlag#CERTIFY_OTHER}.
*
* @return true if the key is able to certify others
*/
boolean canCertify();
static KeyType RSA(RsaLength length) {