public class TreeHashGenerator extends Object
For more information on tree hashing, see http://en.wikipedia.org/wiki/Hash_tree.
Constructor and Description |
---|
TreeHashGenerator() |
Modifier and Type | Method and Description |
---|---|
static String |
calculateTreeHash(File file)
Calculates a hex encoded binary hash using a tree hashing algorithm for
the data in the specified file.
|
static String |
calculateTreeHash(InputStream input)
Calculates a hex encoded binary hash using a tree hashing algorithm for
the data in the specified input stream.
|
static String |
calculateTreeHash(List<byte[]> checksums)
Returns the hex encoded binary tree hash for the individual checksums
given.
|
public static String calculateTreeHash(File file) throws AmazonClientException
file
- The file containing the data to hash.AmazonClientException
- If any problems were encountered reading the data or
computing the hash.public static String calculateTreeHash(InputStream input) throws AmazonClientException
input
- The input stream containing the data to hash.AmazonClientException
- If problems were encountered reading the data or calculating
the hash.public static String calculateTreeHash(List<byte[]> checksums) throws AmazonClientException
AmazonClientException
- If problems were encountered reading the data or calculating
the hash.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.