diff --git a/README.md b/README.md index 406d4eca..ad36f104 100644 --- a/README.md +++ b/README.md @@ -75,23 +75,19 @@ There are some predefined key archetypes, but it is possible to fully customize // Customized key 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) .overrideCompressionAlgorithms(CompressionAlgorithm.ZLIB) - .build() - ).withSubKey( + ).addSubkey( KeySpec.getBuilder( ECDH.fromCurve(EllipticCurve._P256), KeyFlag.ENCRYPT_COMMS, KeyFlag.ENCRYPT_STORAGE) - .build() - ).withMasterKey( - KeySpec.getBuilder( - RSA.withLength(RsaLength._8192), - KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER) - .build() - ).withPrimaryUserId("Juliet ") - .withAdditionalUserId("xmpp:juliet@capulet.lit") - .withPassphrase("romeo_oh_Romeo<3") + ).addUserId("Juliet ") + .addUserId("xmpp:juliet@capulet.lit") + .setPassphrase("romeo_oh_Romeo<3") .build(); ```