1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-22 20:32:05 +01:00

Add XDH keytype factory method

This commit is contained in:
Paul Schaub 2020-12-11 22:09:49 +01:00
parent aff2e6b9f0
commit d65646efc6
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -25,6 +25,8 @@ import org.pgpainless.key.generation.type.eddsa.EdDSA;
import org.pgpainless.key.generation.type.eddsa.EdDSACurve;
import org.pgpainless.key.generation.type.rsa.RsaLength;
import org.pgpainless.key.generation.type.rsa.RSA;
import org.pgpainless.key.generation.type.xdh.XDH;
import org.pgpainless.key.generation.type.xdh.XDHCurve;
public interface KeyType {
@ -72,4 +74,8 @@ public interface KeyType {
static KeyType EDDSA(EdDSACurve curve) {
return EdDSA.fromCurve(curve);
}
static KeyType XDH(XDHCurve curve) {
return XDH.fromCurve(curve);
}
}