hyb
2026-01-09 4cb426cb3ae31e772a09d4ade5b2f0242aaeefa0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
Ë
Žñúhãó—dZddlmZddlmZddlmZmZddlm    Z    m
Z
ddl m Z m Z mZgd¢Ze
j Z    Gd    „d
e«Zef                                                                    dd „Zef                                                                    dd „Zdd „Zdd„Zdd„Zy)a>
Low-level functions if you want to build your own higher level abstractions.
 
.. warning::
    This is a "Hazardous Materials" module.  You should **ONLY** use it if
    you're 100% absolutely sure that you know what you're doing because this
    module is full of land mines, dragons, and dinosaurs with laser guns.
é)Ú annotations)ÚEnum)ÚAnyÚLiteral)ÚffiÚlibé)Ú HashingErrorÚVerificationErrorÚVerifyMismatchError)ÚARGON2_VERSIONÚTyperÚ hash_secretÚhash_secret_rawÚ verify_secretcóX—eZdZdZej
ZejZejZ
y)rzX
    Enum of Argon2 variants.
 
    Please see :doc:`parameters` on how to pick one.
    N) Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚArgon2_dÚDÚArgon2_iÚIÚ    Argon2_idÚID©óúCH:\Change_password\venv_build\Lib\site-packages\argon2/low_level.pyrr(s$„ñð       ‰ €AØ  ‰ €AØ     ‰Brrcóì—tj|||t|«||j«dz}t    j
d|«}    tj |||t    j
d|«t|«t    j
d|«t|«tj||    ||j|« }
|
tjk7rtt|
««‚t    j|    «S)a©
    Hash *secret* and return an **encoded** hash.
 
    An encoded hash can be directly passed into :func:`verify_secret` as it
    contains all parameters and the salt.
 
    Args:
        secret: Secret to hash.
 
        salt: A salt_. Should be random and different for each secret.
 
        type: Which Argon2 variant to use.
 
        version: Which Argon2 version to use.
 
    For an explanation of the Argon2 parameters see
    :class:`argon2.PasswordHasher`.
 
    Returns:
        An encoded Argon2 hash.
 
    Raises:
        argon2.exceptions.HashingError: If hashing fails.
 
    .. versionadded:: 16.0.0
 
    .. _salt: https://en.wikipedia.org/wiki/Salt_(cryptography)
    r    úchar[]ú    uint8_t[]) rÚargon2_encodedlenÚlenÚvaluerÚnewÚ argon2_hashÚNULLÚ    ARGON2_OKr
Ú error_to_strÚstring) ÚsecretÚsaltÚ    time_costÚ memory_costÚ parallelismÚhash_lenÚtypeÚversionÚsizeÚbufÚrvs            rrr4sՀôN     ×ÑØ Ø Ø Ü ‹IØ Ø J‰Jó     
ð ñ     ð    ô '‰'(˜DÓ
!€CÜ     ‰ØØØÜ ‰ ˜VÓ$Ü ˆF‹ Ü ‰ ˜TÓ"Ü ˆD‹    Ü ‰ØØ Ø Ø 
‰
Øó
€Bð
ŒS]‰]ÒÜœ<¨Ó+Ó,Ð,ä :‰:c‹?Ðrcó —tjd|«}tj|||tjd|«t    |«tjd|«t    |«||tj
d|j |« }    |    tjk7rtt|    ««‚ttj||««S)z—
    Hash *password* and return a **raw** hash.
 
    This function takes the same parameters as :func:`hash_secret`.
 
    .. versionadded:: 16.0.0
    r"r) rr&rr'r$r(r%r)r
r*ÚbytesÚbuffer)
r,r-r.r/r0r1r2r3r5r6s
          rrr{s£€ô" '‰'+˜xÓ
(€Cä     ‰ØØØÜ ‰ ˜VÓ$Ü ˆF‹ Ü ‰ ˜TÓ"Ü ˆD‹    Ø ØÜ ‰Ø    Ø 
‰
Øó
€Bð
ŒS]‰]ÒÜœ<¨Ó+Ó,Ð,ä ”—‘˜C Ó*Ó +Ð+rcóF—tjtjd|«tjd|«t    |«|j
«}|tj k(ry|tjk(rtt|««‚tt|««‚)aB
    Verify whether *secret* is correct for *hash* of *type*.
 
    Args:
        hash:
            An encoded Argon2 hash as returned by :func:`hash_secret`.
 
        secret:
            The secret to verify whether it matches the one in *hash*.
 
        type: Type for *hash*.
 
    Raises:
        argon2.exceptions.VerifyMismatchError:
            If verification fails because *hash* is not valid for *secret* of
            *type*.
 
        argon2.exceptions.VerificationError:
            If verification fails for other reasons.
 
    Returns:
        ``True`` on success, raise :exc:`~argon2.exceptions.VerificationError`
        otherwise.
 
    .. versionadded:: 16.0.0
    .. versionchanged:: 16.1.0
        Raise :exc:`~argon2.exceptions.VerifyMismatchError` on mismatches
        instead of its more generic superclass.
    r!r"T) rÚ argon2_verifyrr&r$r%r)ÚARGON2_VERIFY_MISMATCHr r*r )Úhashr,r2r6s    rrr£s}€ô<
×    Ñ    Ü ‰˜$ÓÜ ‰ ˜VÓ$Ü ˆF‹ Ø 
‰
ó    
€Bð
ŒS]‰]ÒØà    ŒS× 'Ñ 'Ò'Ü!¤,¨rÓ"2Ó3Ð3ä
œL¨Ó,Ó
-Ð-rcó.—tj||«S)a¦
    Direct binding to the ``argon2_ctx`` function.
 
    .. warning::
        This is a strictly advanced function working on raw C data structures.
        Both Argon2's and *argon2-cffi*'s higher-level bindings do a lot of
        sanity checks and housekeeping work that *you* are now responsible for
        (e.g. clearing buffers). The structure of the *context* object can,
        has, and will change with *any* release!
 
        Use at your own peril; *argon2-cffi* does *not* use this binding
        itself.
 
    Args:
        context:
            A CFFI Argon2 context object (i.e. an ``struct Argon2_Context`` /
            ``argon2_context``).
 
        type:
            Which Argon2 variant to use.  You can use the ``value`` field of
            :class:`Type`'s fields.
 
    Returns:
        An Argon2 error code.  Can be transformed into a string using
        :func:`error_to_str`.
 
    .. versionadded:: 16.0.0
    )rÚ
argon2_ctx)Úcontextr2s  rÚcorerAÑs€ô: >‰>˜' 4Ó (Ð(rcóp—tjtj|««j    d«S)zê
    Convert an Argon2 error code into a native string.
 
    Args:
        error: An Argon2 error code as returned by :func:`core`.
 
    Returns:
        A human-readable string describing the error.
 
    .. versionadded:: 16.0.0
    Úascii)rr+rÚargon2_error_messageÚdecode)Úerrors rr*r*ñs)€ô :‰:”c×.Ñ.¨uÓ5Ó 6× =Ñ =¸gÓ FÐFrN)r,r8r-r8r.Úintr/rGr0rGr1rGr2rr3rGÚreturnr8)r=r8r,r8r2rrHz Literal[True])r@rr2rGrHrG)rFrGrHÚstr)rÚ
__future__rÚenumrÚtypingrrÚ_argon2_cffi_bindingsrrÚ
exceptionsr
r r Ú__all__ÚARGON2_VERSION_NUMBERr rrrrrAr*rrrú<module>rQs!ðñõ#åßç*çLÑLò €ð×*Ñ*€ðô    ˆ4ô    ð("ðDØ ðDà
ðDððDðð    Dð
ð Dð ð Dð ðDððDð óDð^"ð%,Ø ð%,à
ð%,ðð%,ðð    %,ð
ð %,ð ð %,ð ð%,ðð%,ð ó%,óP+.ó\)ô@ Gr