-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathcrypt.po
More file actions
220 lines (190 loc) · 10.1 KB
/
crypt.po
File metadata and controls
220 lines (190 loc) · 10.1 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-22 21:56+0000\n"
"PO-Revision-Date: 2025-09-22 17:54+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/crypt.rst:2
msgid ":mod:`crypt` --- Function to check Unix passwords"
msgstr ":mod:`crypt` —— 验证 Unix 口令的函数"
#: ../../library/crypt.rst:13
msgid "**Source code:** :source:`Lib/crypt.py`"
msgstr "**源代码:** :source:`Lib/struct.py`"
#: ../../library/crypt.rst:19
msgid ""
"The :mod:`crypt` module is deprecated (see :pep:`PEP 594 <594#crypt>` for "
"details and alternatives). The :mod:`hashlib` module is a potential "
"replacement for certain use cases."
msgstr ""
":mod:`crypt` 模块已被弃用(请参阅 :pep:`PEP 594 <594#crypt>` 了解详情及其替代品)。 "
":mod:`hashlib` 模块是针对特定用例的潜在替换选项。"
#: ../../library/crypt.rst:26
msgid ""
"This module implements an interface to the :manpage:`crypt(3)` routine, "
"which is a one-way hash function based upon a modified DES algorithm; see "
"the Unix man page for further details. Possible uses include storing hashed"
" passwords so you can check passwords without storing the actual password, "
"or attempting to crack Unix passwords with a dictionary."
msgstr ""
"本模块实现了连接 :manpage:`crypt(3)` 的接口,是一个基于改进 DES 算法的单向散列函数;更多细节请参阅 Unix man "
"手册。可能的用途包括保存经过哈希的口令,这样就可以在不存储实际口令的情况下对其进行验证,或者尝试用字典来破解 Unix 口令。"
#: ../../library/crypt.rst:34
msgid ""
"Notice that the behavior of this module depends on the actual implementation"
" of the :manpage:`crypt(3)` routine in the running system. Therefore, any "
"extensions available on the current implementation will also be available "
"on this module."
msgstr "请注意,本模块的执行取决于当前系统中 :manpage:`crypt(3)` 的实际实现。 因此,当前实现版本可用的扩展均可在本模块使用。"
#: ../../library/crypt.rst:40
msgid ":ref:`Availability <availability>`: Unix. Not available on VxWorks."
msgstr ":ref:`可用性 <availability>`: Unix。 在 VxWorks 上不可用。"
#: ../../library/crypt.rst:42
msgid "Hashing Methods"
msgstr "哈希方法"
#: ../../library/crypt.rst:46
msgid ""
"The :mod:`crypt` module defines the list of hashing methods (not all methods"
" are available on all platforms):"
msgstr ":mod:`crypt` 模块定义了哈希方法的列表(不是所有的方法在所有平台上都可用)。"
#: ../../library/crypt.rst:51
msgid ""
"A Modular Crypt Format method with 16 character salt and 86 character hash "
"based on the SHA-512 hash function. This is the strongest method."
msgstr "基于 SHA-512 哈希函数的模块化加密格式方法,具备 16 个字符的 salt 和 86个字符的哈希算法。这是最强的哈希算法。"
#: ../../library/crypt.rst:56
msgid ""
"Another Modular Crypt Format method with 16 character salt and 43 character "
"hash based on the SHA-256 hash function."
msgstr "另一种基于 SHA-256 哈希函数的模块化加密格式方法,具备 16 个字符的 salt 和 43 个字符的哈希算法。"
#: ../../library/crypt.rst:61
msgid ""
"Another Modular Crypt Format method with 22 character salt and 31 character "
"hash based on the Blowfish cipher."
msgstr "另一种基于 Blowfish 的模块化加密格式方法,有 22 个字符的 salt 和 31 个字符的哈希算法。"
#: ../../library/crypt.rst:68
msgid ""
"Another Modular Crypt Format method with 8 character salt and 22 character "
"hash based on the MD5 hash function."
msgstr "另一种基于 MD5 哈希函数的模块化加密格式方法,具备 8 个字符的 salt 和 22 个字符的哈希算法。"
#: ../../library/crypt.rst:73
msgid ""
"The traditional method with a 2 character salt and 13 characters of hash. "
"This is the weakest method."
msgstr "传统的方法,具备 2 个字符的 salt 和 13 个字符的哈希算法。这是最弱的方法。"
#: ../../library/crypt.rst:78
msgid "Module Attributes"
msgstr "模块属性"
#: ../../library/crypt.rst:84
msgid ""
"A list of available password hashing algorithms, as ``crypt.METHOD_*`` "
"objects. This list is sorted from strongest to weakest."
msgstr "可用口令哈希算法的列表,形式为 ``crypt.METHOD_*`` 对象。该列表从最强到最弱进行排序。"
#: ../../library/crypt.rst:90
msgid "Module Functions"
msgstr "模块函数"
#: ../../library/crypt.rst:92
msgid "The :mod:`crypt` module defines the following functions:"
msgstr ":mod:`crypt` 模块定义了以下函数:"
#: ../../library/crypt.rst:96
msgid ""
"*word* will usually be a user's password as typed at a prompt or in a "
"graphical interface. The optional *salt* is either a string as returned "
"from :func:`mksalt`, one of the ``crypt.METHOD_*`` values (though not all "
"may be available on all platforms), or a full encrypted password including "
"salt, as returned by this function. If *salt* is not provided, the "
"strongest method available in :attr:`methods` will be used."
msgstr ""
"*word* 通常将是用户在提示符或图形界面上输入的口令。 可选参数 *salt* 要么是 :func:`mksalt` 所返回的字符串,即 "
"``crypt.METHOD_*`` 值之一(尽管不是在所有平台上都可用),要么就是一个包括 salt 的完全加密的口令,与本函数的返回值一样。 "
"如果未给出 *salt*,则将使用 :attr:`methods` 中提供的最强方法。"
#: ../../library/crypt.rst:103
msgid ""
"Checking a password is usually done by passing the plain-text password as "
"*word* and the full results of a previous :func:`crypt` call, which should "
"be the same as the results of this call."
msgstr "查验口令通常是传入纯文本密码 *word* ,和之前 :func:`crypt` 调用的结果进行比较,应该与本次调用的结果相同。"
#: ../../library/crypt.rst:107
msgid ""
"*salt* (either a random 2 or 16 character string, possibly prefixed with "
"``$digit$`` to indicate the method) which will be used to perturb the "
"encryption algorithm. The characters in *salt* must be in the set "
"``[./a-zA-Z0-9]``, with the exception of Modular Crypt Format which prefixes"
" a ``$digit$``."
msgstr ""
"*salt* (随机的 2 或 16 个字符的字符串,可能带有 ``$digit{TX-PL-LABEL}#x60;`` 前缀以提示相关方法) "
"将被用来扰乱加密算法。 *salt* 中的字符必须在 ``[./a-zA-Z0-9]`` 集合中,但 Modular Crypt Format "
"除外,它会带有 ``$digit{TX-PL-LABEL}#x60;`` 前缀。"
#: ../../library/crypt.rst:113
msgid ""
"Returns the hashed password as a string, which will be composed of "
"characters from the same alphabet as the salt."
msgstr "返回哈希后的口令字符串,将由 salt 所在字母表中的字符组成。"
#: ../../library/crypt.rst:118
msgid ""
"Since a few :manpage:`crypt(3)` extensions allow different values, with "
"different sizes in the *salt*, it is recommended to use the full crypted "
"password as salt when checking for a password."
msgstr ""
"由于有些 :manpage:`crypt(3)` 扩展可以接受各种大小的 *salt* 值,建议在查验口令时采用完整的加密后口令作为 salt。"
#: ../../library/crypt.rst:122
msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*."
msgstr "除了字符串之外, *salt* 还可接受 ``crypt.METHOD_*`` 值。"
#: ../../library/crypt.rst:128
msgid ""
"Return a randomly generated salt of the specified method. If no *method* is"
" given, the strongest method available in :attr:`methods` is used."
msgstr ""
"返回用指定方法随机生成的 salt 值。 如果没有给出 *method*,则会使用 :attr:`methods` 中提供的最强方法。is used."
#: ../../library/crypt.rst:132
msgid ""
"The return value is a string suitable for passing as the *salt* argument to "
":func:`crypt`."
msgstr "返回一个字符串,可用作传入 :func:`crypt` 的 *salt* 参数。"
#: ../../library/crypt.rst:135
msgid ""
"*rounds* specifies the number of rounds for ``METHOD_SHA256``, "
"``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and "
"``METHOD_SHA512`` it must be an integer between ``1000`` and "
"``999_999_999``, the default is ``5000``. For ``METHOD_BLOWFISH`` it must "
"be a power of two between ``16`` (2\\ :sup:`4`) and ``2_147_483_648`` (2\\ "
":sup:`31`), the default is ``4096`` (2\\ :sup:`12`)."
msgstr ""
"*rounds* 指定了 ``METHOD_SHA256``, ``METHOD_SHA512`` 和 ``METHOD_BLOWFISH`` "
"的循环次数。 对于 ``METHOD_SHA256`` 和 ``METHOD_SHA512`` 而言,必须为介于 ``1000`` 和 "
"``999_999_999`` 之间的整数,默认值为 ``5000``。 而对于 ``METHOD_BLOWFISH``,则必须为 ``16`` "
"(2\\ :sup:`4`) 和 ``2_147_483_648`` (2\\ :sup:`31`) 之间的二的幂,默认值为 ``4096`` (2\\"
" :sup:`12`)。"
#: ../../library/crypt.rst:145
msgid "Added the *rounds* parameter."
msgstr "加入 *rounds* 参数。"
#: ../../library/crypt.rst:150
msgid "Examples"
msgstr "例子"
#: ../../library/crypt.rst:152
msgid ""
"A simple example illustrating typical use (a constant-time comparison "
"operation is needed to limit exposure to timing attacks. "
":func:`hmac.compare_digest` is suitable for this purpose)::"
msgstr ""
"以下简单示例演示了典型用法(需要一个时间固定的比较操作来限制留给计时攻击的暴露面。 :func:`hmac.compare_digest` 即很适用):"
#: ../../library/crypt.rst:172
msgid ""
"To generate a hash of a password using the strongest available method and "
"check it against the original::"
msgstr "采用当前强度最高的方法生成哈希值,并与原口令进行核对:"