W3cubDocs

/Haxe Python

HashlibHash

package python.lib

import python.lib.Hashlib

Available on python

Variables

read onlyblock_size:Int

The internal block size of the hash algorithm in bytes.

read onlydigest_size:Int

The size of the resulting hash in bytes.

name:String

The canonical name of this hash, always lowercase and always suitable as a parameter to new() to create another hash of this type.

Methods

copy():HashlibHash

Return a copy (“clone”) of the hash object. This can be used to efficiently compute the digests of data sharing a common initial substring.

digest():Bytes

Return the digest of the data passed to the update() method so far. This is a bytes object of size digest_size which may contain bytes in the whole range from 0 to 255.

hexdigest():String

Like digest() except the digest is returned as a string object of double length, containing only hexadecimal digits. This may be used to exchange the value safely in email or other non-binary environments.

update(a:Bytes):Void

Update the hash object with the object arg, which must be interpretable as a buffer of bytes. Repeated calls are equivalent to a single call with the concatenation of all the arguments: m.update(a); m.update(b) is equivalent to m.update(a+b).

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/python/lib/HashlibHash.html