mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 11:27:57 +01:00
fix comments and javadoc
This commit is contained in:
parent
c11f334fa4
commit
54a4625fed
5 changed files with 49 additions and 5 deletions
|
@ -169,7 +169,6 @@ public class ConsumerOptions {
|
|||
public ConsumerOptions setSessionKey(@Nonnull byte[] sessionKey) {
|
||||
this.sessionKey = sessionKey;
|
||||
throw new NotYetImplementedException();
|
||||
// return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,42 +56,87 @@ public final class EncryptionResult {
|
|||
this.fileEncoding = encoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the symmetric encryption algorithm used to encrypt the message.
|
||||
* @return symmetric encryption algorithm
|
||||
*
|
||||
* @deprecated use {@link #getEncryptionAlgorithm()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public SymmetricKeyAlgorithm getSymmetricKeyAlgorithm() {
|
||||
return getEncryptionAlgorithm();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the symmetric encryption algorithm used to encrypt the message.
|
||||
*
|
||||
* @return symmetric encryption algorithm
|
||||
* */
|
||||
public SymmetricKeyAlgorithm getEncryptionAlgorithm() {
|
||||
return encryptionAlgorithm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the compression algorithm that was used to compress the message before encryption/signing.
|
||||
*
|
||||
* @return compression algorithm
|
||||
*/
|
||||
public CompressionAlgorithm getCompressionAlgorithm() {
|
||||
return compressionAlgorithm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a {@link MultiMap} of key identifiers and detached signatures that were generated for the message.
|
||||
* Each key of the map represents a signing key, which has one or more detached signatures associated with it.
|
||||
*
|
||||
* @return detached signatures
|
||||
*/
|
||||
public MultiMap<SubkeyIdentifier, PGPSignature> getDetachedSignatures() {
|
||||
return detachedSignatures;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the set of recipient encryption keys.
|
||||
*
|
||||
* @return recipients
|
||||
*/
|
||||
public Set<SubkeyIdentifier> getRecipients() {
|
||||
return recipients;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the file name of the encrypted/signed data.
|
||||
*
|
||||
* @return filename
|
||||
*/
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the modification date of the encrypted/signed file.
|
||||
*
|
||||
* @return modification date
|
||||
*/
|
||||
public Date getModificationDate() {
|
||||
return modificationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the encoding format of the encrypted/signed data.
|
||||
*
|
||||
* @return encoding format
|
||||
*/
|
||||
public StreamEncoding getFileEncoding() {
|
||||
return fileEncoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true, if the message is marked as for-your-eyes-only.
|
||||
* This is typically done by setting the filename "_CONSOLE".
|
||||
*
|
||||
* @return is message for your eyes only?
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
|
|
@ -428,7 +428,7 @@ public final class Policy {
|
|||
minimalBitStrengths.put(PublicKeyAlgorithm.RSA_GENERAL, 2000);
|
||||
minimalBitStrengths.put(PublicKeyAlgorithm.RSA_SIGN, 2000);
|
||||
minimalBitStrengths.put(PublicKeyAlgorithm.RSA_ENCRYPT, 2000);
|
||||
// TODO: ElGamal is not mentioned in the BSI document.
|
||||
// Note: ElGamal is not mentioned in the BSI document.
|
||||
// We assume that the requirements are similar to other DH algorithms
|
||||
minimalBitStrengths.put(PublicKeyAlgorithm.ELGAMAL_ENCRYPT, 2000);
|
||||
minimalBitStrengths.put(PublicKeyAlgorithm.ELGAMAL_GENERAL, 2000);
|
||||
|
@ -436,7 +436,7 @@ public final class Policy {
|
|||
minimalBitStrengths.put(PublicKeyAlgorithm.DSA, 2000);
|
||||
// §5.4.3
|
||||
minimalBitStrengths.put(PublicKeyAlgorithm.ECDSA, 250);
|
||||
// TODO: EdDSA is not mentioned in the BSI document.
|
||||
// Note: EdDSA is not mentioned in the BSI document.
|
||||
// We assume that the requirements are similar to other EC algorithms.
|
||||
minimalBitStrengths.put(PublicKeyAlgorithm.EDDSA, 250);
|
||||
// §7.2.1
|
||||
|
@ -451,7 +451,7 @@ public final class Policy {
|
|||
|
||||
/**
|
||||
* Return the {@link NotationRegistry} of PGPainless.
|
||||
* The notation registry is used to decide, whether or not a Notation is known or not.
|
||||
* The notation registry is used to decide, whether a Notation is known or not.
|
||||
* Background: Critical unknown notations render signatures invalid.
|
||||
*
|
||||
* @return Notation registry
|
||||
|
|
|
@ -92,6 +92,7 @@ public class DetachedSignature {
|
|||
* Return the {@link OpenPgpV4Fingerprint} of the key that created the signature.
|
||||
*
|
||||
* @return fingerprint of the signing key
|
||||
* @deprecated use {@link #getSigningKeyIdentifier()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public OpenPgpV4Fingerprint getFingerprint() {
|
||||
|
|
|
@ -479,7 +479,6 @@ public final class SignatureSubpacketsUtil {
|
|||
|
||||
/**
|
||||
* Return the signatures exportable certification subpacket from the hashed area.
|
||||
* TODO: Can this packet also be placed in the unhashed area?
|
||||
*
|
||||
* @param signature signature
|
||||
* @return exportable certification subpacket
|
||||
|
|
Loading…
Reference in a new issue