mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-29 15:52:08 +01:00
Update README
This commit is contained in:
parent
be47a96030
commit
708282ba0a
1 changed files with 8 additions and 12 deletions
20
README.md
20
README.md
|
@ -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();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue