| Access | Constructor and Description |
|---|---|
| public | |
| public | PGPSignatureSubpacketGenerator(PGPSignatureSubpacketVector
an initial set of subpackets. sigSubV)Constructor for pre-initialising the generator from an existing one. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addEmbeddedSignature(boolean
true if should be treated as critical, false otherwise. isCritical, PGPSignature embedded signature pgpSignature)Add an embedded signature packet. |
| public void | addIntendedRecipientFingerprint(boolean
true if critical, false otherwise. isCritical, PGPPublicKey the public key the encrypted payload was encrypted against. publicKey)Adds a intended recipient fingerprint for an encrypted payload the signature is associated with. |
| public void | addNotationData(boolean
true if should be treated as critical, false otherwise. isCritical, boolean true if the notation is human-readable. isHumanReadable, String name of the notation key. notationName, String value of the notation. notationValue)Add a notation data packet to the signature. |
| public void | |
| public void | addRevocationKey(boolean
true if should be treated as critical, false otherwise. isCritical, int algorithm of the revocation key keyAlgorithm, byte[] fingerprint of the revocation key fingerprint)Adds a revocation key sub packet. |
| public void | addSignerUserID(boolean
true if should be treated as critical, false otherwise. isCritical, String signer user-id userID)Add a signer user-id to the signature. |
| public PGPSignatureSubpacketVector | |
| public SignatureSubpacket[] | Returns: an array of zero or more matching subpackets.subpacket type code type)Return all signature subpackets of the passed in type currently in the generator. |
| public boolean | Returns: true if present, false otherwise.type to look for. type)Return true if a particular subpacket type exists. |
| public boolean | removePacket(SignatureSubpacket
the signature subpacket to remove. packet)Remove a previously set packet from the generator. |
| public void | setEmbeddedSignature(boolean
true if should be treated as critical, false otherwise. isCritical, PGPSignature embedded signature pgpSignature)
Deprecated
use
Add an embedded signature packet.
addEmbeddedSignature(boolean, PGPSignature) instead.
|
| public void | setExportable(boolean
true if should be treated as critical, false otherwise. isCritical, boolean true if the signature should be exportable, false otherwise. isExportable)Specify, whether or not the signature should be marked as exportable. |
| public void | setFeature(boolean
true if should be treated as critical, false otherwise. isCritical, byte features feature)Specify the set of features of the key. |
| public void | setIntendedRecipientFingerprint(boolean
true if critical, false otherwise. isCritical, PGPPublicKey the public key the encrypted payload was encrypted against. publicKey)
Deprecated
use
Adds a intended recipient fingerprint for an encrypted payload the signature is associated with.
addIntendedRecipientFingerprint(boolean, PGPPublicKey) instead.
|
| public void | setIssuerFingerprint(boolean
true if critical, false otherwise. isCritical, PGPSecretKey the secret key used to generate the associated signature. secretKey)Sets the signature issuer fingerprint for the signing key. |
| public void | setIssuerFingerprint(boolean
true if critical, false otherwise. isCritical, PGPPublicKey the public key needed to verify the associated signature. publicKey)Sets the signature issuer fingerprint for the signing key. |
| public void | setIssuerKeyID(boolean
true if should be treated as critical, false otherwise. isCritical, long id of the key that issued the signature keyID)Sets issuer key-id subpacket. |
| public void | setKeyExpirationTime(boolean
true if should be treated as critical, false otherwise. isCritical, long seconds)Set the number of seconds a key is valid for after the time of its creation. |
| public void | setKeyFlags(boolean
true if should be treated as critical, false otherwise. isCritical, int flags flags)Set this keys key flags. |
| public void | setNotationData(boolean
true if should be treated as critical, false otherwise. isCritical, boolean true if the notation is human-readable. isHumanReadable, String name of the notation key notationName, String value of the notation notationValue)
Deprecated
use
Add a notation data packet to the signature.
addNotationData(boolean, boolean, String, String) instead.
|
| public void | setPreferredAEADAlgorithms(boolean
true if should be treated as critical, false otherwise. isCritical, int[] array of algorithms in descending preference algorithms)Specify the preferred AEAD algorithms of this key. |
| public void | setPreferredCompressionAlgorithms(boolean
true if should be treated as critical, false otherwise. isCritical, int[] array of algorithms in descending preference algorithms)Specify the preferred compression algorithms of this key. |
| public void | setPreferredHashAlgorithms(boolean
true if should be treated as critical, false otherwise. isCritical, int[] array of algorithms in descending preference algorithms)Specify the preferred hash algorithms of the key. |
| public void | setPreferredSymmetricAlgorithms(boolean
true if should be treated as critical, false otherwise. isCritical, int[] array of algorithms in descending preference algorithms)Specify the preferred symmetric encryption algorithms of the key. |
| public void | |
| public void | setRevocable(boolean
true if should be treated as critical, false otherwise. isCritical, boolean true if the signature should be revocable, false otherwise. isRevocable)Specify, whether or not the signature is revocable. |
| public void | setRevocationKey(boolean
true if should be treated as critical, false otherwise. isCritical, int algorithm of the revocation key keyAlgorithm, byte[] fingerprint of the revocation key fingerprint)
Deprecated
use
Adds a revocation key sub packet.
addRevocationKey(boolean, int, byte[]) instead.
|
| public void | setRevocationReason(boolean
true if should be treated as critical, false otherwise. isCritical, byte reason code for the revocation reason, String human readable description of the revocation reason description)Sets revocation reason sub packet. |
| public void | |
| public void | setSignatureExpirationTime(boolean
true if should be treated as critical, false otherwise. isCritical, long seconds)Set the number of seconds a signature is valid for after the time of its creation. |
| public void | setSignatureTarget(boolean
true if should be treated as critical, false otherwise. isCritical, int algorithm of the key that issued the signature that is being referred to. publicKeyAlgorithm, int hash algorithm that was used to calculate the hash data. hashAlgorithm, byte[] hash of the signature that is being referred to. hashData)Sets the signature target sub packet. |
| public void | setSignerUserID(boolean
true if should be treated as critical, false otherwise. isCritical, String signer user-id userID)
Deprecated
use
Add a signer user-id to the signature.
addSignerUserID(boolean, String) instead.
|
| public void | |
| public void | setTrust(boolean
true if the packet is critical. isCritical, int depth level. depth, int trust amount. trustAmount)Add a TrustSignature packet to the signature. |
| packets | back to summary |
|---|---|
| pack-priv List<E> packets | |
| PGPSignatureSubpacketGenerator | back to summary |
|---|---|
| public PGPSignatureSubpacketGenerator() Base constructor, creates an empty generator. | |
| PGPSignatureSubpacketGenerator | back to summary |
|---|---|
| public PGPSignatureSubpacketGenerator(PGPSignatureSubpacketVector sigSubV) Constructor for pre-initialising the generator from an existing one.
| |
| addCustomSubpacket | back to summary |
|---|---|
| public void addCustomSubpacket(SignatureSubpacket subpacket) Add a custom subpacket. Miscellaneous subpackets are subpackets that Bouncycastle does not recognize or doesn't have first class support for.
| |
| addEmbeddedSignature | back to summary |
|---|---|
| public void addEmbeddedSignature(boolean isCritical, PGPSignature pgpSignature) throws IOException Add an embedded signature packet.
| |
| addIntendedRecipientFingerprint | back to summary |
|---|---|
| public void addIntendedRecipientFingerprint(boolean isCritical, PGPPublicKey publicKey) Adds a intended recipient fingerprint for an encrypted payload the signature is associated with.
| |
| addNotationData | back to summary |
|---|---|
| public void addNotationData(boolean isCritical, boolean isHumanReadable, String notationName, String notationValue) Add a notation data packet to the signature. | |
| addPolicyURI | back to summary |
|---|---|
| public void addPolicyURI(boolean isCritical, String policyUri) | |
| addRevocationKey | back to summary |
|---|---|
| public void addRevocationKey(boolean isCritical, int keyAlgorithm, byte[] fingerprint) Adds a revocation key sub packet.
| |
| addSignerUserID | back to summary |
|---|---|
| public void addSignerUserID(boolean isCritical, String userID) Add a signer user-id to the signature.
| |
| generate | back to summary |
|---|---|
| public PGPSignatureSubpacketVector generate() | |
| getSubpackets | back to summary |
|---|---|
| public SignatureSubpacket[] getSubpackets(int type) Return all signature subpackets of the passed in type currently in the generator.
| |
| hasSubpacket | back to summary |
|---|---|
| public boolean hasSubpacket(int type) Return true if a particular subpacket type exists.
| |
| removePacket | back to summary |
|---|---|
| public boolean removePacket(SignatureSubpacket packet) Remove a previously set packet from the generator.
| |
| setEmbeddedSignature | back to summary |
|---|---|
| public void setEmbeddedSignature(boolean isCritical, PGPSignature pgpSignature) throws IOException
Deprecated use Add an embedded signature packet.
| |
| setExportable | back to summary |
|---|---|
| public void setExportable(boolean isCritical, boolean isExportable) Specify, whether or not the signature should be marked as exportable. If this subpacket is missing, the signature is treated as being exportable.
| |
| setFeature | back to summary |
|---|---|
| public void setFeature(boolean isCritical, byte feature) Specify the set of features of the key.
| |
| setIntendedRecipientFingerprint | back to summary |
|---|---|
| public void setIntendedRecipientFingerprint(boolean isCritical, PGPPublicKey publicKey)
Deprecated use Adds a intended recipient fingerprint for an encrypted payload the signature is associated with.
| |
| setIssuerFingerprint | back to summary |
|---|---|
| public void setIssuerFingerprint(boolean isCritical, PGPSecretKey secretKey) Sets the signature issuer fingerprint for the signing key.
| |
| setIssuerFingerprint | back to summary |
|---|---|
| public void setIssuerFingerprint(boolean isCritical, PGPPublicKey publicKey) Sets the signature issuer fingerprint for the signing key.
| |
| setIssuerKeyID | back to summary |
|---|---|
| public void setIssuerKeyID(boolean isCritical, long keyID) Sets issuer key-id subpacket.
| |
| setKeyExpirationTime | back to summary |
|---|---|
| public void setKeyExpirationTime(boolean isCritical, long seconds) Set the number of seconds a key is valid for after the time of its creation. A value of zero means the key never expires.
| |
| setKeyFlags | back to summary |
|---|---|
| public void setKeyFlags(boolean isCritical, int flags) Set this keys key flags.
See
| |
| setNotationData | back to summary |
|---|---|
| public void setNotationData(boolean isCritical, boolean isHumanReadable, String notationName, String notationValue)
Deprecated use Add a notation data packet to the signature. | |
| setPreferredAEADAlgorithms | back to summary |
|---|---|
| public void setPreferredAEADAlgorithms(boolean isCritical, int[] algorithms) Specify the preferred AEAD algorithms of this key.
| |
| setPreferredCompressionAlgorithms | back to summary |
|---|---|
| public void setPreferredCompressionAlgorithms(boolean isCritical, int[] algorithms) Specify the preferred compression algorithms of this key.
See
| |
| setPreferredHashAlgorithms | back to summary |
|---|---|
| public void setPreferredHashAlgorithms(boolean isCritical, int[] algorithms) Specify the preferred hash algorithms of the key.
See
| |
| setPreferredSymmetricAlgorithms | back to summary |
|---|---|
| public void setPreferredSymmetricAlgorithms(boolean isCritical, int[] algorithms) Specify the preferred symmetric encryption algorithms of the key.
See
| |
| setPrimaryUserID | back to summary |
|---|---|
| public void setPrimaryUserID(boolean isCritical, boolean isPrimaryUserID) | |
| setRevocable | back to summary |
|---|---|
| public void setRevocable(boolean isCritical, boolean isRevocable) Specify, whether or not the signature is revocable.
| |
| setRevocationKey | back to summary |
|---|---|
| public void setRevocationKey(boolean isCritical, int keyAlgorithm, byte[] fingerprint)
Deprecated use Adds a revocation key sub packet.
| |
| setRevocationReason | back to summary |
|---|---|
| public void setRevocationReason(boolean isCritical, byte reason, String description) Sets revocation reason sub packet.
See
| |
| setSignatureCreationTime | back to summary |
|---|---|
| public void setSignatureCreationTime(boolean isCritical, Date date) Set the creation time for the signature. Note this overrides the generation of a creation time when the signature is generated. | |
| setSignatureExpirationTime | back to summary |
|---|---|
| public void setSignatureExpirationTime(boolean isCritical, long seconds) Set the number of seconds a signature is valid for after the time of its creation. A value of zero means the signature never expires.
| |
| setSignatureTarget | back to summary |
|---|---|
| public void setSignatureTarget(boolean isCritical, int publicKeyAlgorithm, int hashAlgorithm, byte[] hashData) Sets the signature target sub packet.
| |
| setSignerUserID | back to summary |
|---|---|
| public void setSignerUserID(boolean isCritical, String userID)
Deprecated use Add a signer user-id to the signature.
| |
| setSignerUserID | back to summary |
|---|---|
| public void setSignerUserID(boolean isCritical, byte[] rawUserID) | |
| setTrust | back to summary |
|---|---|
| public void setTrust(boolean isCritical, int depth, int trustAmount) Add a TrustSignature packet to the signature. The values for depth and trust are largely installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13.
| |