pgpainless/src/main/java/de/vanitasvitae/crypto/pgpainless/Main.java

26 lines
899 B
Java
Raw Normal View History

2018-06-02 21:21:35 +02:00
package de.vanitasvitae.crypto.pgpainless;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
2018-06-02 21:21:35 +02:00
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Security;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPSecretKeyRing;
public class Main {
public static void main(String[] args)
throws NoSuchAlgorithmException, PGPException, NoSuchProviderException, IOException,
InvalidAlgorithmParameterException {
2018-06-02 21:21:35 +02:00
Security.addProvider(new BouncyCastleProvider());
PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing()
.simpleEcKeyRing("elliptic@cur.ve");
2018-06-02 21:21:35 +02:00
//System.out.println(Base64.getEncoder().encodeToString(secretKeys.getEncoded()));
2018-06-02 21:21:35 +02:00
}
}