From d65646efc60ac06f3e13156519257d8b4bc67c6f Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 11 Dec 2020 22:09:49 +0100 Subject: [PATCH] Add XDH keytype factory method --- .../java/org/pgpainless/key/generation/type/KeyType.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/generation/type/KeyType.java b/pgpainless-core/src/main/java/org/pgpainless/key/generation/type/KeyType.java index 7daa87f1..3fd45558 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/generation/type/KeyType.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/generation/type/KeyType.java @@ -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); + } }