3TfddlmZddlZddlZddlmZgdZGddejZ Gdd ejZ ejjZ e je Gd d ejZGd d e ZGdde ZGdde ZGdde ZGdde ZGdde ZGdde ZGdde ZGdde ZGdde ZGd d!e ZGd"d#e eZGd$d%e eZGd&d'e ZGd(d)e ZGd*d+e ZGd,d-e Zy).) annotationsN)openssl) HashAlgorithm HashContextHashExtendableOutputFunctionSHA1 SHA512_224 SHA512_256SHA224SHA256SHA384SHA512SHA3_224SHA3_256SHA3_384SHA3_512SHAKE128SHAKE256MD5BLAKE2bBLAKE2sSM3ceZdZeej ddZeej ddZeej ddZy)rcy)zH A string naming this algorithm (e.g. "sha256", "md5"). Nselfs G/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/hashes.pynamezHashAlgorithm.name&cy)z< The size of the resulting digest in bytes. Nrrs r digest_sizezHashAlgorithm.digest_size-r!r"cy)z The internal block size of the hash function, or None if the hash function does not use blocks internally (e.g. SHA3). Nrrs r block_sizezHashAlgorithm.block_size4r!r"N)returnstrr'int)r'ztyping.Optional[int]) __name__ __module__ __qualname__propertyabcabstractmethodr r$r&rr"rrr%sf       r"r) metaclassceZdZeej ddZej ddZej ddZej d dZ y) rcy)zD A HashAlgorithm that will be used by this context. Nrrs r algorithmzHashContext.algorithm>r!r"cy)z@ Processes the provided bytes through the hash. Nr)rdatas rupdatezHashContext.updateEr!r"cy)zR Finalizes the hash context and returns the hash digest as bytes. Nrrs rfinalizezHashContext.finalizeKr!r"cy)zM Return a HashContext that is a copy of the current context. Nrrs rcopyzHashContext.copyQr!r"N)r'r)r6bytesr'None)r'r<)r'r) r+r,r-r.r/r0r4r7r9r;rr"rrr=sp            r"rceZdZdZy)rz7 An interface for extendable output functions. N)r+r,r-__doc__rr"rrr\sr"rceZdZdZdZdZy)r sha1@Nr+r,r-r r$r&rr"rr r bs DKJr"r ceZdZdZdZdZy)r z sha512-224NrDrr"rr r h DKJr"r ceZdZdZdZdZy)r z sha512-256 rGNrDrr"rr r nrHr"r ceZdZdZdZdZy)r sha224rFrCNrDrr"rr r t DKJr"r ceZdZdZdZdZy)r sha256rJrCNrDrr"rr r zrMr"r ceZdZdZdZdZy)rsha3840rGNrDrr"rrr DKJr"rceZdZdZdZdZy)rsha512rCrGNrDrr"rrrrSr"rceZdZdZdZdZy)rzsha3-224rFNrDrr"rrr DKJr"rceZdZdZdZdZy)rzsha3-256rJNrDrr"rrrrWr"rceZdZdZdZdZy)rzsha3-384rRNrDrr"rrrrWr"rceZdZdZdZdZy)rzsha3-512rCNrDrr"rrrrWr"rc.eZdZdZdZddZeddZy)rshake128Ncht|ts td|dkr td||_yNzdigest_size must be an integerz&digest_size must be a positive integer isinstancer* TypeError ValueError _digest_sizerr$s r__init__zSHAKE128.__init__3+s+<= = ?EF F'r"c|jSNrdrs rr$zSHAKE128.digest_size   r"r$r*r)r+r,r-r r&rfr.r$rr"rrr% DJ(!!r"rc.eZdZdZdZddZeddZy)rshake256Ncht|ts td|dkr td||_yr^r`res rrfzSHAKE256.__init__rgr"c|jSrirjrs rr$zSHAKE256.digest_sizerkr"rlr)rmrr"rrrrnr"rceZdZdZdZdZy)rmd5rCNrDrr"rrr DKJr"rc6eZdZdZdZdZdZddZed dZ y) rblake2brCr_rGc2|dk7r td||_y)NrCzDigest size must be 64rcrdres rrfzBLAKE2b.__init__ " 56 6'r"c|jSrirjrs rr$zBLAKE2b.digest_sizerkr"Nrlr)) r+r,r-r _max_digest_size_min_digest_sizer&rfr.r$rr"rrrs1 DJ( !!r"rc6eZdZdZdZdZdZddZed dZ y) rblake2srCrJr_c2|dk7r td||_y)NrJzDigest size must be 32rzres rrfzBLAKE2s.__init__r{r"c|jSrirjrs rr$zBLAKE2s.digest_sizerkr"Nrlr)) r+r,r-r r&r}r~rfr.r$rr"rrrs1 DJ( !!r"rceZdZdZdZdZy)rsm3rJrCNrDrr"rrrrvr"r) __future__rr/typing"cryptography.hazmat.bindings._rustr rust_openssl__all__ABCMetarrhashesrregisterrr r r r r rrrrrrrrrrrrrr"rrs= # F 2 ckk 0 CKK 6 T =   ] ] ] ] } } } } !}6!$!}6!$- !m!"!m!"-r"