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 SimpleHashParameters
MD5
Represents the MD5 (128-bit) hash algorithm.static SimpleHashParameters
SHA1
Represents the SHA-1 (160-bit) hash algorithm.static SimpleHashParameters
SHA256
Represents the SHA-256 (256-bit) hash algorithm.static SimpleHashParameters
SHA384
Represents the SHA-384 (384-bit) hash algorithm.static SimpleHashParameters
SHA512
Represents the SHA-512 (512-bit) hash algorithm.
-
Constructor Summary
Constructors Constructor Description SimpleHashParameters(java.lang.String algorithm)
Constructs aSimpleHashParameters
with the given algorithm name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
algorithm()
Returns the canonical name of the hash algorithm.boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
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 aSimpleHashParameters
with the given algorithm name.- Parameters:
algorithm
- the name of the hash algorithm
-
-
Method Detail
-
algorithm
public java.lang.String algorithm()
Description copied from interface:HashParameters
Returns the canonical name of the hash algorithm.- Specified by:
algorithm
in interfaceHashParameters
- Returns:
- the name of the hash algorithm
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-