swh.model.fields.hashes module#
- swh.model.fields.hashes.validate_hash(value, hash_type)[source]#
- Validate that the given value represents a hash of the given hash_type. - Parameters:
- value – the value to check 
- hash_type – the type of hash the value is representing 
 
- Returns:
- True if the hash validates 
- Raises:
- ValueError if the hash does not validate –