public class WithDigest extends Object implements ArchiveConfigurationPlugin, ManifestProcessor, ArchiveResourceListener
Adds the archive's contents as digests in the manifest.
Modifier and Type | Field and Description |
---|---|
protected MessageDigest |
digester |
protected Manifest |
manifest |
Modifier and Type | Method and Description |
---|---|
void |
added(ArchiveResource resource) |
void |
attach(ArchiveRegistrar core) |
protected String |
base64Digest(byte[] data)
base64Digest.
|
WithDigest |
digestedBy(MessageDigest digest)
Adds digest entries to the manifest.
|
WithDigest |
digestedBy(StandardDigestAlgorithms hash)
Adds digest entries to the manifest.
|
void |
process(Manifest manifest) |
static WithDigest |
withDigest()
withDigest.
|
protected MessageDigest digester
protected Manifest manifest
public static WithDigest withDigest()
withDigest.
WithDigest
object.public void attach(ArchiveRegistrar core)
attach
in interface ArchiveConfigurationPlugin
public void added(ArchiveResource resource)
added
in interface ArchiveResourceListener
protected String base64Digest(byte[] data)
base64Digest.
data
- an array of byte
objects.String
object.public void process(Manifest manifest)
process
in interface ManifestProcessor
public WithDigest digestedBy(StandardDigestAlgorithms hash)
hash
- the algorithm namepublic WithDigest digestedBy(MessageDigest digest)
digest
- the hash algorithmCopyright © 2018 earcam. All rights reserved.