1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 22:32:07 +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 { public interface KeyType {
/**
* Return the encryption algorithm name.
*
* @return algorithm name.
*/
String getName(); String getName();
/**
* Return the public key algorithm.
*
* @return public key algorithm
*/
PublicKeyAlgorithm getAlgorithm(); PublicKeyAlgorithm getAlgorithm();
/**
* Return an implementation of {@link AlgorithmParameterSpec} that can be used to generate the key.
*
* @return algorithm parameter spec
*/
AlgorithmParameterSpec getAlgorithmSpec(); 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(); boolean canCertify();
static KeyType RSA(RsaLength length) { static KeyType RSA(RsaLength length) {