Generate BLAKE2b Hash using Python

hashlib library

import hashlib

digestSize = 64  # 64 (512-bit), 48 (384-bit), 32 (256-bit), 28 (224-bit)

text = 'Hello'
hashObject = hashlib.blake2b(text.encode('utf-8'), digest_size=digestSize)
digest = hashObject.hexdigest()

print(digest)

Leave a Comment

Cancel reply

Your email address will not be published.