Package com.scurrilous.circe.params
Class SimpleHashParameters
- java.lang.Object
-
- com.scurrilous.circe.params.SimpleHashParameters
-
- All Implemented Interfaces:
HashParameters
public class SimpleHashParameters extends java.lang.Object implements HashParameters
Hash parameters consisting only of an algorithm name. Includes instances describing some commonly used algorithms.
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleHashParametersMD5Represents the MD5 (128-bit) hash algorithm.static SimpleHashParametersSHA1Represents the SHA-1 (160-bit) hash algorithm.static SimpleHashParametersSHA256Represents the SHA-256 (256-bit) hash algorithm.static SimpleHashParametersSHA384Represents the SHA-384 (384-bit) hash algorithm.static SimpleHashParametersSHA512Represents the SHA-512 (512-bit) hash algorithm.
-
Constructor Summary
Constructors Constructor Description SimpleHashParameters(java.lang.String algorithm)Constructs aSimpleHashParameterswith the given algorithm name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringalgorithm()Returns the canonical name of the hash algorithm.booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
MD5
public static final SimpleHashParameters MD5
Represents the MD5 (128-bit) hash algorithm.
-
SHA1
public static final SimpleHashParameters SHA1
Represents the SHA-1 (160-bit) hash algorithm.
-
SHA256
public static final SimpleHashParameters SHA256
Represents the SHA-256 (256-bit) hash algorithm.
-
SHA384
public static final SimpleHashParameters SHA384
Represents the SHA-384 (384-bit) hash algorithm.
-
SHA512
public static final SimpleHashParameters SHA512
Represents the SHA-512 (512-bit) hash algorithm.
-
-
Constructor Detail
-
SimpleHashParameters
public SimpleHashParameters(java.lang.String algorithm)
Constructs aSimpleHashParameterswith the given algorithm name.- Parameters:
algorithm- the name of the hash algorithm
-
-
Method Detail
-
algorithm
public java.lang.String algorithm()
Description copied from interface:HashParametersReturns the canonical name of the hash algorithm.- Specified by:
algorithmin interfaceHashParameters- Returns:
- the name of the hash algorithm
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-