msticpy/sectools/tiproviders/ti_provider_base.py
def _preprocess_hash(hash_str: str) -> SanitizedObservable:
    """Ensure Hash has minimum entropy (rather than a string of 'x')."""
    str_entropy = entropy(hash_str)
    if str_entropy < 3.0:
        return SanitizedObservable(None, "String has too low an entropy to be a hash")
    return SanitizedObservable(hash_str, "ok")
Ensure Hash has minimum entropy (rather than a string of 'x').
Ensure Hash has minimum entropy (rather than a string of 'x').
Ensure Hash has minimum entropy ( rather than a string of ' x ' ) .
def _preprocess_hash(hash_str: str) -> SanitizedObservable:
    str_entropy = entropy(hash_str)
    if str_entropy < 3.0:
        return SanitizedObservable(None, "String has too low an entropy to be a hash")
    return SanitizedObservable(hash_str, "ok")
def _preprocess_hash ( hash_str : str ) -> SanitizedObservable : str_entropy = entropy ( hash_str ) if str_entropy < 3.0 : return SanitizedObservable ( None , "String has too low an entropy to be a hash" ) return SanitizedObservable ( hash_str , "ok" )
Ensure Hash has minimum entropy (rather than a string of 'x').
Ensure Hash has minimum entropy ( rather than a string of ' x ' ) .
"""Ensure Hash has minimum entropy (rather than a string of 'x')."""
hash_str
str