<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hash_sha256(buf):
 """AuthenticationHelper.hash"""

    a = hashlib.sha256(buf).hexdigest()
    return (64 - len(a)) * '0' + a