def alphanumeric_hash(s: str, size=5):
  """Short alphanumeric string derived from hash of given string"""
  import hashlib
  import base64
  hash_object = hashlib.md5(s.encode('ascii'))
  s = base64.b32encode(hash_object.digest())
  result = s[:size].decode('ascii').lower()
  return result
def alphanumeric_hash ( s : str , size = 5 ) : import hashlib import base64 hash_object = hashlib . md5 ( s . encode ( 'ascii' ) ) s = base64 . b32encode ( hash_object . digest ( ) ) result = s [ : size ] . decode ( 'ascii' ) . lower ( ) return result
Short alphanumeric string derived from hash of given string