1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-14 07:34:52 +02:00

Update README

This commit is contained in:
Paul Schaub 2021-09-20 12:32:15 +02:00
parent be47a96030
commit 708282ba0a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -75,23 +75,19 @@ There are some predefined key archetypes, but it is possible to fully customize
// Customized key // Customized key
PGPSecretKeyRing keyRing = PGPainless.generateKeyRing() PGPSecretKeyRing keyRing = PGPainless.generateKeyRing()
.withSubKey( .setPrimaryKey(KeySpec.getBuilder(
RSA.withLength(RsaLength._8192),
KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER))
.addSubkey(
KeySpec.getBuilder(ECDSA.fromCurve(EllipticCurve._P256), KeyFlag.SIGN_DATA) KeySpec.getBuilder(ECDSA.fromCurve(EllipticCurve._P256), KeyFlag.SIGN_DATA)
.overrideCompressionAlgorithms(CompressionAlgorithm.ZLIB) .overrideCompressionAlgorithms(CompressionAlgorithm.ZLIB)
.build() ).addSubkey(
).withSubKey(
KeySpec.getBuilder( KeySpec.getBuilder(
ECDH.fromCurve(EllipticCurve._P256), ECDH.fromCurve(EllipticCurve._P256),
KeyFlag.ENCRYPT_COMMS, KeyFlag.ENCRYPT_STORAGE) KeyFlag.ENCRYPT_COMMS, KeyFlag.ENCRYPT_STORAGE)
.build() ).addUserId("Juliet <juliet@montague.lit>")
).withMasterKey( .addUserId("xmpp:juliet@capulet.lit")
KeySpec.getBuilder( .setPassphrase("romeo_oh_Romeo<3")
RSA.withLength(RsaLength._8192),
KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER)
.build()
).withPrimaryUserId("Juliet <juliet@montague.lit>")
.withAdditionalUserId("xmpp:juliet@capulet.lit")
.withPassphrase("romeo_oh_Romeo<3")
.build(); .build();
``` ```