org.bouncycastle.openpgp

Class PGPSignatureSubpacketGenerator


public class PGPSignatureSubpacketGenerator
extends java.lang.Object

Generator for signature subpackets.

Constructor Summary

PGPSignatureSubpacketGenerator()

Method Summary

PGPSignatureSubpacketVector
generate()
void
setExportable(boolean isCritical, boolean isExportable)
void
setKeyExpirationTime(boolean isCritical, long seconds)
Set the number of seconds a key is valid for after the time of its creation.
void
setKeyFlags(boolean isCritical, int flags)
void
setPreferredCompressionAlgorithms(boolean isCritical, int[] algorithms)
void
setPreferredHashAlgorithms(boolean isCritical, int[] algorithms)
void
setPreferredSymmetricAlgorithms(boolean isCritical, int[] algorithms)
void
setPrimaryUserID(boolean isCritical, boolean isPrimaryUserID)
void
setRevocable(boolean isCritical, boolean isRevocable)
void
setSignatureCreationTime(boolean isCritical, Date date)
Set the creation time for the signature.
void
setSignatureExpirationTime(boolean isCritical, long seconds)
Set the number of seconds a signature is valid for after the time of its creation.
void
setSignerUserID(boolean isCritical, String userID)
void
setTrust(boolean isCritical, int depth, int trustAmount)

Constructor Details

PGPSignatureSubpacketGenerator

public PGPSignatureSubpacketGenerator()

Method Details

generate

public PGPSignatureSubpacketVector generate()

setExportable

public void setExportable(boolean isCritical,
                          boolean isExportable)

setKeyExpirationTime

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.
Parameters:
isCritical - true if should be treated as critical, false otherwise.
seconds -

setKeyFlags

public void setKeyFlags(boolean isCritical,
                        int flags)

setPreferredCompressionAlgorithms

public void setPreferredCompressionAlgorithms(boolean isCritical,
                                              int[] algorithms)

setPreferredHashAlgorithms

public void setPreferredHashAlgorithms(boolean isCritical,
                                       int[] algorithms)

setPreferredSymmetricAlgorithms

public void setPreferredSymmetricAlgorithms(boolean isCritical,
                                            int[] algorithms)

setPrimaryUserID

public void setPrimaryUserID(boolean isCritical,
                             boolean isPrimaryUserID)

setRevocable

public void setRevocable(boolean isCritical,
                         boolean isRevocable)

setSignatureCreationTime

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

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.
Parameters:
isCritical - true if should be treated as critical, false otherwise.
seconds -

setSignerUserID

public void setSignerUserID(boolean isCritical,
                            String userID)

setTrust

public void setTrust(boolean isCritical,
                     int depth,
                     int trustAmount)