hyb
2026-01-30 7657e1b2fa251a2ea372710ad75cb395a3c0e374
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
Ë
ž¬`iz+ãóŠ—ddlmZddlmZddlmZmZmZmZm    Z    m
Z
m Z m Z m Z edd«Zd„ZGd„de«Zd    „Zd
„Zd Zd Zy )é)Úget_random_bytes)Ú _copy_bytes)    Úload_pycryptodome_raw_libÚcreate_string_bufferÚget_raw_bufferÚ VoidPointerÚ SmartPointerÚc_size_tÚ c_uint8_ptrÚc_ulongÚis_writeable_bufferzCrypto.Cipher._chacha20aè
                    int chacha20_init(void **pState,
                                      const uint8_t *key,
                                      size_t keySize,
                                      const uint8_t *nonce,
                                      size_t nonceSize);
 
                    int chacha20_destroy(void *state);
 
                    int chacha20_encrypt(void *state,
                                         const uint8_t in[],
                                         uint8_t out[],
                                         size_t len);
 
                    int chacha20_seek(void *state,
                                      unsigned long block_high,
                                      unsigned long block_low,
                                      unsigned offset);
 
                    int hchacha20(  const uint8_t key[32],
                                    const uint8_t nonce16[16],
                                    uint8_t subkey[32]);
                    cóà—t|«dk(sJ‚t|«dk(sJ‚td«}tjt    |«t    |«t    |««}|rt d|z«‚|S)Né éz,Error %d when deriving subkey with HChaCha20)ÚlenÚ    bytearrayÚ_raw_chacha20_libÚ    hchacha20r Ú
ValueError)ÚkeyÚnonceÚsubkeyÚresults    õiH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\Crypto/Cipher/ChaCha20.pyÚ
_HChaCha20rCsp€ä ˆs‹8rŠ>Ј>Ü ˆu‹:˜Ò ÐÐ ä r‹]€FÜ × (Ñ (ܘCӠܘEÓ"ܘFÓ#ó%€FñÜÐGÈ&ÑPÓQÐQà €Mócó6—eZdZdZdZd„Zd    d„Zd„Zd    d„Zd„Z    y)
ÚChaCha20Cipherz¹ChaCha20 (or XChaCha20) cipher object.
    Do not create it directly. Use :py:func:`new` instead.
 
    :var nonce: The nonce with length 8, 12 or 24 bytes
    :vartype nonce: bytes
    éc ó6—tdd|«|_t|«dk(rt||dd«}d|ddz}d|_nd|_|j}d|_t «|_tj|jj«t|«tt|««|tt|«««}|rtd||jfz«‚t|jj«tj «|_y)    z\Initialize a ChaCha20/XChaCha20 cipher object
 
        See also `new()` at the module level.NéróÚ    XChaCha20ÚChaCha20)ÚencryptÚdecryptz"Error %d instantiating a %s cipher)rrrrÚ_nameÚ_nextrÚ_staterÚ chacha20_initÚ
address_ofr r
rr    ÚgetÚchacha20_destroy)Úselfrrrs    rÚ__init__zChaCha20Cipher.__init__]sþ€ô
!  t¨UÓ3ˆŒ
ô ˆu‹:˜Ò ܘS %¨¨ *Ó-ˆCØ %¨¨ *Ñ,ˆEØ$ˆDJà#ˆDŒJØ—J‘JˆEà+ˆŒ
ä!“mˆŒ Ü"×0Ñ0ØŸ ™ ×.Ñ.Ó0Ü# CÓ(Ü ¤ S£Ó*ØÜ ¤ U£Ó,ó .ˆñ ÜÐAÀVØEIÇZÁZðEQñQóRð Rä" 4§;¡;§?¡?Ó#4Ü#4×#EÑ#EóGˆ rNcóf—d|jvr td«‚d|_|j||«S)a«Encrypt a piece of data.
 
        Args:
          plaintext(bytes/bytearray/memoryview): The data to encrypt, of any size.
        Keyword Args:
          output(bytes/bytearray/memoryview): The location where the ciphertext
            is written to. If ``None``, the ciphertext is returned.
        Returns:
          If ``output`` is ``None``, the ciphertext is returned as ``bytes``.
          Otherwise, ``None``.
        r%z-Cipher object can only be used for decryption)r%)r(Ú    TypeErrorÚ_encrypt)r.Ú    plaintextÚoutputs   rr%zChaCha20Cipher.encrypt}s4€ð ˜DŸJ™JÑ &ÜÐKÓLÐ LØ!ˆŒ
؏}‰}˜Y¨Ó/Ð/rc
ó¸—|€tt|««}nF|}t|«s td«‚t|«t|«k7rt    dt|«z«‚t
j |jj«t|«t|«tt|«««}|rt    d||jfz«‚|€ t|«Sy)zEncrypt without FSM checksNz4output must be a bytearray or a writeable memoryviewz9output must have the same length as the input  (%d bytes)z!Error %d while encrypting with %s) rrr r1rrÚchacha20_encryptr)r,r r
r'r)r.r3r4Ú
ciphertextrs     rr2zChaCha20Cipher._encryptsЀð ˆ>Ü-¬c°)«nÓ=‰JàˆJä& vÔ.ÜРVÓWÐWä9‹~¤ V£Ò,Ü ð"0Ü25°i³.ñ"AóBðBô#×3Ñ3Ø)-¯©¯©Ó):Ü)4°YÓ)?Ü)4°ZÓ)@Ü)1´#°i³.Ó)Aó    Cˆñ
ÜÐ@ÀFÈDÏJÉJÐCWÑWÓXÐ Xà ˆ>Ü! *Ó-Ð -àrcóҗd|jvr td«‚d|_    |j||«S#t$r)}tt    |«j dd««‚d}~wwxYw)a©Decrypt a piece of data.
 
        Args:
          ciphertext(bytes/bytearray/memoryview): The data to decrypt, of any size.
        Keyword Args:
          output(bytes/bytearray/memoryview): The location where the plaintext
            is written to. If ``None``, the plaintext is returned.
        Returns:
          If ``output`` is ``None``, the plaintext is returned as ``bytes``.
          Otherwise, ``None``.
        r&z-Cipher object can only be used for encryption)r&ÚencÚdecN)r(r1r2rÚstrÚreplace)r.r7r4Úes    rr&zChaCha20Cipher.decrypt«sc€ð ˜DŸJ™JÑ &ÜÐKÓLÐ LØ!ˆŒ
ð    ;Ø—=‘= ¨VÓ4Ð 4øÜò    ;ÜœS ›VŸ^™^¨E°5Ó9Ó:Ð :ûð    ;ús¢4´    A&½$A!Á!A&cóò—t|d«\}}|dz}|dz    }tj|jj    «t |«t |«|«}|rt d||jfz«‚y)aSeek to a certain position in the key stream.
 
        If you want to seek to a certain block,
        use ``seek(block_number * 64)``.
 
        Args:
          position (integer):
            The absolute position within the key stream, in bytes.
        é@lÿÿrzError %d while seeking with %sN)ÚdivmodrÚ chacha20_seekr)r,r rr')r.ÚpositionÚ block_numberÚoffsetÚ    block_lowÚ
block_highrs       rÚseekzChaCha20Cipher.seekÁs~€ô & h°Ó3ш fØ  :Ñ-ˆ    Ø! RÑ'ˆ
ä"×0Ñ0Ø15·±·±Ó1BÜ18¸Ó1DÜ18¸Ó1CØ17ó    3ˆñ ÜÐ=ÀÈÏÉÐ@TÑTÓUÐ Uð r)N)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú
block_sizer/r%r2r&rG©rrrrSs*„ñð€JòGó@0ò$ó8;ó,Vrrcó—t|«dk7r td«‚|€td«x}}n0t|«dk(rd|z}nt|«dk(r|}n td«‚t||¬«j    d    «}|dd
|d
d|fS) zrDerive a tuple (r, s, nonce) for a Poly1305 MAC.
 
    If nonce is ``None``, a new 12-byte nonce is generated.
    rz-Poly1305 with ChaCha20 requires a 32-byte keyNé ér"z6Poly1305 with ChaCha20 requires an 8- or 12-byte nonce)rrs r)rrrÚnewr%)rrÚ padded_nonceÚrss    rÚ_derive_Poly1305_key_pairrTÚs“€ô  ˆ3ƒx2‚~ÜÐHÓIÐIà €}Ü/°Ó3Ð3ˆ ‘uÜ     ˆU‹qŠð+¨UÑ2‰ Ü     ˆU‹rÒ    Ø‰ äÐQÓRÐRä     ˜LÔ    )×    1Ñ    1°,Ó    ?€BØ ˆcˆrˆ7BrsG˜UÐ "Ð"rc óN—    |jd«}|jdd«}|€ td«}t    |«dk7r t d«‚t    |«dvr t d    «‚|rtd
t |«z«‚t||«S#t$r}td|z«‚d}~wwxYw) a}Create a new ChaCha20 or XChaCha20 cipher
 
    Keyword Args:
        key (bytes/bytearray/memoryview): The secret key to use.
            It must be 32 bytes long.
        nonce (bytes/bytearray/memoryview): A mandatory value that
            must never be reused for any other encryption
            done with this key.
 
            For ChaCha20, it must be 8 or 12 bytes long.
 
            For XChaCha20, it must be 24 bytes long.
 
            If not provided, 8 bytes will be randomly generated
            (you can find them back in the ``nonce`` attribute).
 
    :Return: a :class:`Crypto.Cipher.ChaCha20.ChaCha20Cipher` object
    rzMissing parameter %sNrrPrz,ChaCha20/XChaCha20 key must be 32 bytes long)rPrOr!z:Nonce must be 8/12 bytes(ChaCha20) or 24 bytes (XChaCha20)zUnknown parameters: )ÚpopÚKeyErrorr1rrrr;r)Úkwargsrr=rs    rrQrQ÷s­€ð(4؏j‰j˜Óˆð J‰Jw Ó %€EØ €}Ü  Ó#ˆä
ˆ3ƒx2‚~ÜÐGÓHÐHä
ˆ5ƒz˜Ñ$ÜÐUÓVÐVá ÜÐ.´°V³Ñ<Ó=Ð=ä ˜#˜uÓ %Ð%øô! ò4ÜÐ.°Ñ2Ó3Ð3ûð4ús‚B    B$ÂBÂB$rrN)Ú Crypto.RandomrÚCrypto.Util.py3compatrÚCrypto.Util._raw_apirrrrr    r
r r r rrÚobjectrrTrQrLÚkey_sizerMrrú<module>r^s`ðõ>+å-÷7÷7õ7ñ.Ð.GðóÐò4 ô DVVôDVòN#ò:&&ðR€
ð r