Package org.apache.tika.digest
Class DigestDef
java.lang.Object
org.apache.tika.digest.DigestDef
Defines a digest algorithm with its output encoding.
Example JSON configuration:
{
"digests": [
{ "algorithm": "MD5" },
{ "algorithm": "SHA256", "encoding": "BASE32" }
]
}
The metadata key format is:
X-TIKA:digest:MD5- for HEX encoding (default)X-TIKA:digest:SHA256:BASE32- for non-default encodings
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported digest algorithms.static enumSupported digest output encodings. -
Constructor Summary
ConstructorsConstructorDescriptionDigestDef(DigestDef.Algorithm algorithm) DigestDef(DigestDef.Algorithm algorithm, DigestDef.Encoding encoding) -
Method Summary
Modifier and TypeMethodDescriptionReturns the metadata key for storing this digest value.voidsetAlgorithm(DigestDef.Algorithm algorithm) voidsetEncoding(DigestDef.Encoding encoding)
-
Constructor Details
-
DigestDef
public DigestDef() -
DigestDef
-
DigestDef
-
-
Method Details
-
getAlgorithm
-
setAlgorithm
-
getEncoding
-
setEncoding
-
metadataKey
Returns the metadata key for storing this digest value.For HEX encoding (the default), returns
X-TIKA:digest:ALGORITHM. For other encodings, returnsX-TIKA:digest:ALGORITHM:ENCODING.- Returns:
- the metadata key
-