mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Add XDH keytype factory method
This commit is contained in:
parent
aff2e6b9f0
commit
d65646efc6
1 changed files with 6 additions and 0 deletions
|
@ -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.eddsa.EdDSACurve;
|
||||||
import org.pgpainless.key.generation.type.rsa.RsaLength;
|
import org.pgpainless.key.generation.type.rsa.RsaLength;
|
||||||
import org.pgpainless.key.generation.type.rsa.RSA;
|
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 {
|
public interface KeyType {
|
||||||
|
|
||||||
|
@ -72,4 +74,8 @@ public interface KeyType {
|
||||||
static KeyType EDDSA(EdDSACurve curve) {
|
static KeyType EDDSA(EdDSACurve curve) {
|
||||||
return EdDSA.fromCurve(curve);
|
return EdDSA.fromCurve(curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static KeyType XDH(XDHCurve curve) {
|
||||||
|
return XDH.fromCurve(curve);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue