public final class ContentDigest extends Object
Modifier and Type | Field and Description |
---|---|
static Map<String,String> |
algorithmToScheme |
static String |
DEFAULT_ALGORITHM |
static Map<String,String> |
schemeToAlgorithm |
Modifier and Type | Method and Description |
---|---|
static URI |
asURI(String algorithm,
byte[] data)
Convert a MessageDigest algorithm and checksum byte-array data to a URN
|
static URI |
asURI(String algorithm,
String value)
Convert a MessageDigest algorithm and checksum value to a URN
|
static String |
getAlgorithm(URI digestUri)
Given a digest URI, get the corresponding MessageDigest algorithm
|
static URI |
missingChecksum()
Placeholder checksum value.
|
public static final Map<String,String> algorithmToScheme
public static final Map<String,String> schemeToAlgorithm
public static final String DEFAULT_ALGORITHM
public static URI asURI(String algorithm, String value)
algorithm
- the message digest algorithmvalue
- the checksum valuepublic static URI asURI(String algorithm, byte[] data)
algorithm
- the message digest algorithmdata
- the checksum byte-array datapublic static String getAlgorithm(URI digestUri)
digestUri
- the digest uripublic static URI missingChecksum()
Copyright © 2013–2016 DuraSpace, Inc.. All rights reserved.