sha – ujjlenyomat

Ez a modul az md5 modulhoz hasonlóan kivonatot készít a szövegről, csak azt 128 bit helyett 160 bittel teszi.

Az sha használata

# File: sha_kivonat_keszitese.py

import sha

hash = sha.new()
hash.update("En vagyok a hires egyfeju")

print repr(hash.digest())
print hash.hexdigest()
# File: sha_kivonat_keszitese.out

'Z\xdf1\xb5\x18Vk65~\x14\x96\x1c\xd5\xffR\x08Q\xe0Z'5adf31b518566b3635
7e14961cd5ff520851e05a

Post Comments

You must be logged in to post a comment.