Package org.ossreviewtoolkit.model
Object Hash.Companion
-
- All Implemented Interfaces:
public class Hash.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final HashNONEpublic final static Hash.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Hashcreate(String value)Create a Hash instance from a known hash value. final Hashcreate(String value, String algorithm)Create a Hash instance from a known hash value and algorithm. final HashgetNONE()A constant to specify that no hash value (and thus also no hash algorithm) is provided. -
-
Method Detail
-
create
final Hash create(String value)
Create a Hash instance from a known hash value. If the HashAlgorithm cannot be determined, HashAlgorithm.UNKNOWN along with the original value is returned.
-
create
final Hash create(String value, String algorithm)
Create a Hash instance from a known hash value and algorithm. This is mostly used for deserialization to verify the algorithm matches the one determined by the value.
-
-
-
-