def encoded_hash(sha):
 return urlsafe_b64encode(sha.digest()).decode('ascii').rstrip('=')

def encoded_hash ( sha ) : return urlsafe_b64encode ( sha . digest ( ) ) . decode ( 'ascii' ) . rstrip ( '=' )
return a short .