|
Cryptix OpenPGP | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcryptix.openpgp.PGPAbstractV3SignatureParameterBuilder
Abstract class for v3 signature parameters.
Constructor Summary | |
protected |
PGPAbstractV3SignatureParameterBuilder(java.security.Key issuerkey,
byte sigtype)
Construct a new PGPAbstractV3SignatureParameterBuilder using the given issuer key and signature type byte. |
protected |
PGPAbstractV3SignatureParameterBuilder(KeyID issuerkeyid,
byte sigtype)
Construct a new PGPAbstractV3SignatureParameterBuilder using the given issuer key id and signature type byte. |
Method Summary | |
java.security.spec.AlgorithmParameterSpec |
build()
Build an immutable parameter specification This method can be called more than once, which is useful in case you want to create multiple signatures with almost the same parameters. |
void |
setCreationDate(java.util.Date creation)
Set the signature creation date packet With this method one can set the signature creation date and time to any random value. |
void |
setIssuerKeyID(KeyID issuerkeyid)
Set the issuer key id |
void |
setSignatureType(byte sigtype)
Sets the signature type byte |
void |
updateCreationDate()
Updates the signature creation date packet to the current date and time This method is simply a wrapper around setCreationDate, calling it with the current date and time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected PGPAbstractV3SignatureParameterBuilder(KeyID issuerkeyid, byte sigtype)
issuerkeyid
- the key id of the key issuing the signaturesigtype
- the signature type byteprotected PGPAbstractV3SignatureParameterBuilder(java.security.Key issuerkey, byte sigtype) throws java.security.InvalidKeyException
Note: this is just a convenience method that will extract the key id from the given key. If you already have the key id, calling the other constructor with that key id is faster.
issuerkey
- the key issuing the signaturesigtype
- the signature type byte
java.security.InvalidKeyException
- if getting the key id of the issuer key fails
because of an incompatible or invalid key.Method Detail |
public java.security.spec.AlgorithmParameterSpec build()
This method can be called more than once, which is useful in case you want to create multiple signatures with almost the same parameters. Note that in this case all parameters will stay the same, including the creation date and time, which may not be desirable. Use the updateCreationDate() method to prevent this from happening.
public void updateCreationDate()
This method is simply a wrapper around setCreationDate, calling it with the current date and time.
public void setCreationDate(java.util.Date creation)
With this method one can set the signature creation date and time to any random value. While this has useful applications, it should be used carefully because setting it to something else than the current time may break some things.
creation
- the new date and timepublic void setIssuerKeyID(KeyID issuerkeyid)
issuerkeyid
- the key id of the key issuing the signaturepublic void setSignatureType(byte sigtype)
sigtype
- the new signature type byte
|
Cryptix OpenPGP | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |