def sha512_digest(instr):
    '''
    Generate a sha512 hash of a given string
    '''
    return salt.utils.stringutils.to_unicode(
        hashlib.sha512(salt.utils.stringutils.to_bytes(instr)).hexdigest()
    )
def sha512_digest ( instr ) : return salt . utils . stringutils . to_unicode ( hashlib . sha512 ( salt . utils . stringutils . to_bytes ( instr ) ) . hexdigest ( ) )
Generate a sha512 hash of a given string