mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-14 04:39:39 +02:00
Fix typos and wording
This commit is contained in:
parent
ce7b69269b
commit
b1bde161b4
40 changed files with 87 additions and 87 deletions
|
@ -26,7 +26,7 @@ public class OnePassSignatureVerificationWithPartialLengthLiteralDataRegressionT
|
|||
* PGPainless versions 0.2.10 - 0.2.18 fail to decrypt this message, due to it failing to parse the signatures trailing
|
||||
* the literal data. The cause for this was not draining the literal data first before trying to parse the sigs.
|
||||
* This is likely caused by the literal data using a partial length encoding scheme, so the PGPObjectFactory did not yet
|
||||
* reach the signatures packet.
|
||||
* reach the signatures packets.
|
||||
*
|
||||
* As a fix, PGPainless now only tries to parse signatures from after the literal data packet, once the literal data
|
||||
* stream gets closed.
|
||||
|
|
|
@ -212,7 +212,7 @@ public class CleartextSignatureVerificationTest {
|
|||
@Test
|
||||
public void getDecoderStreamMistakensPlaintextForBase64RegressionTest()
|
||||
throws PGPException, IOException {
|
||||
String message = "Foo\nBar"; // PGPUtil.getDecoderStream() would mistaken this for base64 data
|
||||
String message = "Foo\nBar"; // PGPUtil.getDecoderStream() would have mistaken this for base64 data
|
||||
ByteArrayInputStream msgIn = new ByteArrayInputStream(message.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
PGPSecretKeyRing secretKey = TestKeys.getEmilSecretKeyRing();
|
||||
|
|
|
@ -83,7 +83,7 @@ public class GenerateKeys {
|
|||
}
|
||||
|
||||
/**
|
||||
* This example demonstrates how to generate a simple OpenPGP key consisting of a 4096 bit RSA key.
|
||||
* This example demonstrates how to generate a simple OpenPGP key consisting of a 4096-bit RSA key.
|
||||
* The RSA key is used for both signing and certifying, as well as encryption.
|
||||
*
|
||||
* This method is recommended if the application has to deal with legacy clients with poor algorithm support.
|
||||
|
@ -107,7 +107,7 @@ public class GenerateKeys {
|
|||
|
||||
/**
|
||||
* This example demonstrates how to generate a simple OpenPGP key based on elliptic curves.
|
||||
* The key consists of an ECDSA primary key that is used both for certification of subkeys, as well as signing of data,
|
||||
* The key consists of an ECDSA primary key that is used both for certification of subkeys, and signing of data,
|
||||
* and a single ECDH encryption subkey.
|
||||
*
|
||||
* This method is recommended if small keys and high performance are desired.
|
||||
|
@ -141,7 +141,7 @@ public class GenerateKeys {
|
|||
* {@link KeySpec} objects can best be obtained by using the {@link KeySpec#getBuilder(KeyType, KeyFlag, KeyFlag...)}
|
||||
* method and providing a {@link KeyType}.
|
||||
* There are a bunch of factory methods for different {@link KeyType} implementations present in {@link KeyType} itself
|
||||
* (such as {@link KeyType#ECDH(EllipticCurve)}. {@link KeyFlag KeyFlags} determine
|
||||
* (such as {@link KeyType#ECDH(EllipticCurve)}). {@link KeyFlag KeyFlags} determine
|
||||
* the use of the key, like encryption, signing data or certifying subkeys.
|
||||
*
|
||||
* If you so desire, you can now specify your own algorithm preferences.
|
||||
|
@ -155,7 +155,7 @@ public class GenerateKeys {
|
|||
* make sure that the primary key spec has the {@link KeyFlag} {@link KeyFlag#CERTIFY_OTHER} set, as this is a requirement
|
||||
* for primary keys.
|
||||
*
|
||||
* Furthermore you have to set at least the primary user-id via
|
||||
* Furthermore, you have to set at least the primary user-id via
|
||||
* {@link org.pgpainless.key.generation.KeyRingBuilder#addUserId(String)},
|
||||
* but you can also add additional user-ids.
|
||||
*
|
||||
|
@ -187,11 +187,11 @@ public class GenerateKeys {
|
|||
.addSubkey(KeySpec.getBuilder(
|
||||
// We choose an ECDH key over the brainpoolp256r1 curve
|
||||
KeyType.ECDH(EllipticCurve._BRAINPOOLP256R1),
|
||||
// Our key can encrypt both communication data, as well as data at rest
|
||||
// Our key can encrypt both communication data, and data at rest
|
||||
KeyFlag.ENCRYPT_STORAGE, KeyFlag.ENCRYPT_COMMS
|
||||
)
|
||||
// Optionally: Configure the subkey with custom algorithm preferences
|
||||
// Is is recommended though to go with PGPainless' defaults which can be found in the
|
||||
// It is recommended though to go with PGPainless' defaults which can be found in the
|
||||
// AlgorithmSuite class.
|
||||
.overridePreferredSymmetricKeyAlgorithms(SymmetricKeyAlgorithm.AES_256, SymmetricKeyAlgorithm.AES_192, SymmetricKeyAlgorithm.AES_128)
|
||||
.overridePreferredHashAlgorithms(HashAlgorithm.SHA512, HashAlgorithm.SHA384, HashAlgorithm.SHA256)
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.pgpainless.util.NotationRegistry;
|
|||
* Note, that PGPainless distinguishes between hash algorithms used in revocation and non-revocation signatures,
|
||||
* and has different policies for those.
|
||||
*
|
||||
* Furthermore PGPainless has policies for symmetric encryption algorithms (both for encrypting and decrypting),
|
||||
* Furthermore, PGPainless has policies for symmetric encryption algorithms (both for encrypting and decrypting),
|
||||
* for public key algorithms and key lengths, as well as compression algorithms.
|
||||
*
|
||||
* The following examples show how these policies can be modified.
|
||||
|
|
|
@ -154,7 +154,7 @@ public class ModifyKeys {
|
|||
* Prerequisites are a {@link SecretKeyRingProtector} that is capable of unlocking the primary key of the existing key,
|
||||
* and a {@link Passphrase} for the new subkey.
|
||||
*
|
||||
* There are two way to add a subkey into an existing key;
|
||||
* There are two ways to add a subkey into an existing key;
|
||||
* Either the subkey gets generated on the fly (see below),
|
||||
* or the subkey already exists. In the latter case, the user has to provide
|
||||
* {@link org.bouncycastle.openpgp.PGPSignatureSubpacketVector PGPSignatureSubpacketVectors} for the binding signature
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue