org.apache.shiro.crypto.hash
Interface Hash

All Known Implementing Classes:
AbstractHash, Md2Hash, Md5Hash, Sha1Hash, Sha256Hash, Sha384Hash, Sha512Hash

public interface Hash

A Cryptographic Hash represents a one-way conversion algorithm that transforms an input source to an underlying byte array.

Since:
0.9
Author:
Les Hazlewood
See Also:
AbstractHash, Md2Hash, Md5Hash, Sha1Hash, Sha256Hash, Sha384Hash, Sha512Hash

Method Summary
 byte[] getBytes()
          Returns this Hash's byte array, that is, the hashed value of the original input source.
 String toBase64()
          Returns a Base64 encoding of this Hash's byte array.
 String toHex()
          Returns a Hex encoding of this Hash's byte array.
 

Method Detail

getBytes

byte[] getBytes()
Returns this Hash's byte array, that is, the hashed value of the original input source.

Returns:
this Hash's byte array, that is, the hashed value of the original input source.
See Also:
toHex(), toBase64()

toHex

String toHex()
Returns a Hex encoding of this Hash's byte array.

Returns:
a Hex encoding of this Hash's byte array.

toBase64

String toBase64()
Returns a Base64 encoding of this Hash's byte array.

Returns:
a Base64 encoding of this Hash's byte array.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.