com.intel.crypto
Class HashAlg
- java.lang.Object
-
- com.intel.crypto.HashAlg
-
-
Field Summary
Fields Modifier and Type Field and Description static short
HASH_TYPE_SHA1
SHA1 hash algorithm.static short
HASH_TYPE_SHA256
SHA256 hash algorithm,static short
SHA1_HASH_LENGTH
SHA1 hash length in bytes.static short
SHA256_HASH_LENGTH
SHA256 hash length in bytes.
-
Method Summary
Methods Modifier and Type Method and Description static HashAlg
create(short algType)
Factory method for creating a concrete instance.short
getHashAlg()
Returns the hash algorithm used by this hash instance.-
Methods inherited from interface com.intel.crypto.Hash
getHashLength, processComplete, processUpdate
-
-
-
-
Field Detail
-
HASH_TYPE_SHA1
public static final short HASH_TYPE_SHA1
SHA1 hash algorithm.- See Also:
- Constant Field Values
-
HASH_TYPE_SHA256
public static final short HASH_TYPE_SHA256
SHA256 hash algorithm,- See Also:
- Constant Field Values
-
SHA1_HASH_LENGTH
public static final short SHA1_HASH_LENGTH
SHA1 hash length in bytes.- See Also:
- Constant Field Values
-
SHA256_HASH_LENGTH
public static final short SHA256_HASH_LENGTH
SHA256 hash length in bytes.- See Also:
- Constant Field Values
-
-
Method Detail
-
getHashAlg
public short getHashAlg()
Returns the hash algorithm used by this hash instance.- Specified by:
getHashAlg
in interfaceHash
- Returns:
- The hash algorithm used.
-
create
public static final HashAlg create(short algType) throws CryptoException
Factory method for creating a concrete instance.- Parameters:
algType
- the requested hash algorithm, see HASH_TYPE_... definitions above for the possible values- Returns:
HashAlg
instance of the requested hash type.- Throws:
NotSupportedException
- if the requested algorithm is not supportedCryptoException
-
-