java.lang.Object
org.xbib.rpm.security.SignatureGenerator
To verify the authenticity of the package, the SIGTAG_PGP tag holds a
Version 3 OpenPGP Signature Packet RSA signature of the header and payload areas.
The SIGTAG_GPG tag holds a Version 3 OpenPGP Signature Packet DSA signature of the header and payload areas.
The SIGTAG_DSAHEADER holds a DSA signature of just the header section.
If the SIGTAG_DSAHEADER tag is included, the SIGTAG_GPG tag must also be present.
The SIGTAG_ RSAHEADER holds an RSA signature of just the header section.
If the SIGTAG_ RSAHEADER tag is included, the SIGTAG_PGP tag must also be present.
-
Constructor Summary
ConstructorsConstructorDescriptionSignatureGenerator(InputStream privateKeyRing, Long privateKeyId, String privateKeyPassphrase) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleanvoidprepare(SignatureHeader signature, HashAlgo algo) voidstartBeforeHeader(WritableChannelWrapper output, HashAlgo algo) ChannelWrapper.Key<byte[]>startDigest(WritableChannelWrapper output, String digest) Start a digest.
-
Constructor Details
-
SignatureGenerator
public SignatureGenerator(InputStream privateKeyRing, Long privateKeyId, String privateKeyPassphrase)
-
-
Method Details
-
prepare
-
startBeforeHeader
- Throws:
RpmException
-
startDigest
public ChannelWrapper.Key<byte[]> startDigest(WritableChannelWrapper output, String digest) throws RpmException Start a digest.- Parameters:
output- the output channeldigest- the message digest- Returns:
- reference to the new key added to the consumers
- Throws:
RpmException- if digest could not be generated
-
finishAfterHeader
-
finishAfterPayload
-
isEnabled
public boolean isEnabled()
-