-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathsecrets.po
214 lines (184 loc) · 9.16 KB
/
secrets.po
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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Arisaka97 <[email protected]>, 2020
# Freesand Leo <[email protected]>, 2020
# ppcfish <[email protected]>, 2020
# Rafael Fontenelle <[email protected]>, 2024
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-15 08:14+0000\n"
"PO-Revision-Date: 2020-05-30 12:09+0000\n"
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\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/secrets.rst:2
msgid ":mod:`secrets` --- Generate secure random numbers for managing secrets"
msgstr ":mod:`secrets` --- 生成管理密码的安全随机数"
#: ../../library/secrets.rst:16
msgid "**Source code:** :source:`Lib/secrets.py`"
msgstr "**源代码:** :source:`Lib/secrets.py`"
#: ../../library/secrets.rst:20
msgid ""
"The :mod:`secrets` module is used for generating cryptographically strong "
"random numbers suitable for managing data such as passwords, account "
"authentication, security tokens, and related secrets."
msgstr ":mod:`secrets` 模块用于生成高度加密的随机数,适于管理密码、账户验证、安全凭据及机密数据。"
#: ../../library/secrets.rst:24
msgid ""
"In particular, :mod:`secrets` should be used in preference to the default "
"pseudo-random number generator in the :mod:`random` module, which is "
"designed for modelling and simulation, not security or cryptography."
msgstr ""
"最好用 :mod:`secrets` 替代 :mod:`random` 模块的默认伪随机数生成器,该生成器适用于建模和模拟,不宜用于安全与加密。"
#: ../../library/secrets.rst:30
msgid ":pep:`506`"
msgstr ":pep:`506`"
#: ../../library/secrets.rst:34
msgid "Random numbers"
msgstr "随机数"
#: ../../library/secrets.rst:36
msgid ""
"The :mod:`secrets` module provides access to the most secure source of "
"randomness that your operating system provides."
msgstr ":mod:`secrets` 模块是操作系统提供的最安全地随机性来源。"
#: ../../library/secrets.rst:41
msgid ""
"A class for generating random numbers using the highest-quality sources "
"provided by the operating system. See :class:`random.SystemRandom` for "
"additional details."
msgstr "用操作系统提供的最高质量源生成随机数的类。详见 :class:`random.SystemRandom`。"
#: ../../library/secrets.rst:47
msgid "Return a randomly-chosen element from a non-empty sequence."
msgstr "返回从非空序列中随机选取的元素。"
#: ../../library/secrets.rst:51
msgid "Return a random int in the range [0, *n*)."
msgstr "返回 [0, *n*) 范围内的随机整数。"
#: ../../library/secrets.rst:55
msgid "Return an int with *k* random bits."
msgstr "返回 *k* 个随机比特位的整数。"
#: ../../library/secrets.rst:59
msgid "Generating tokens"
msgstr "生成 Token"
#: ../../library/secrets.rst:61
msgid ""
"The :mod:`secrets` module provides functions for generating secure tokens, "
"suitable for applications such as password resets, hard-to-guess URLs, and "
"similar."
msgstr ":mod:`secrets` 模块提供了生成安全 Token 的函数,适用于密码重置、密保 URL 等应用场景。"
#: ../../library/secrets.rst:67
msgid ""
"Return a random byte string containing *nbytes* number of bytes. If *nbytes*"
" is ``None`` or not supplied, a reasonable default is used."
msgstr ""
"返回含 *nbytes* 个字节的随机字节字符串。如果未提供 *nbytes*,或*nbytes* 为 ``None``,则使用合理的默认值。"
#: ../../library/secrets.rst:79
msgid ""
"Return a random text string, in hexadecimal. The string has *nbytes* random"
" bytes, each byte converted to two hex digits. If *nbytes* is ``None`` or "
"not supplied, a reasonable default is used."
msgstr ""
"返回十六进制随机文本字符串。字符串有 *nbytes* 个随机字节,每个字节转换为两个十六进制数码。未提供 *nbytes* 或为 ``None`` "
"时,则使用合理的默认值。"
#: ../../library/secrets.rst:90
msgid ""
"Return a random URL-safe text string, containing *nbytes* random bytes. The"
" text is Base64 encoded, so on average each byte results in approximately "
"1.3 characters. If *nbytes* is ``None`` or not supplied, a reasonable "
"default is used."
msgstr ""
"返回安全的 URL 随机文本字符串,包含 *nbytes* 个随机字节。文本用 Base64 编码,平均来说,每个字节对应 1.3 个结果字符。未提供 "
"*nbytes* 或为 ``None`` 时,则使用合理的默认值。"
#: ../../library/secrets.rst:102
msgid "How many bytes should tokens use?"
msgstr "Token 应当使用多少个字节?"
#: ../../library/secrets.rst:104
msgid ""
"To be secure against `brute-force attacks "
"<https://en.wikipedia.org/wiki/Brute-force_attack>`_, tokens need to have "
"sufficient randomness. Unfortunately, what is considered sufficient will "
"necessarily increase as computers get more powerful and able to make more "
"guesses in a shorter period. As of 2015, it is believed that 32 bytes (256 "
"bits) of randomness is sufficient for the typical use-case expected for the "
":mod:`secrets` module."
msgstr ""
"为了在面对 `暴力攻击 <https://en.wikipedia.org/wiki/Brute-force_attack>`_ 时保证安全,Token"
" 的随机性必须足够高。随着计算机推衍能力的不断提升,随机性的安全标准也要不断提高。比如 2015 年,32 字节(256 位)的随机性对于 "
":mod:`secrets` 模块的典型用例就已经足够了。"
#: ../../library/secrets.rst:112
msgid ""
"For those who want to manage their own token length, you can explicitly "
"specify how much randomness is used for tokens by giving an :class:`int` "
"argument to the various ``token_*`` functions. That argument is taken as "
"the number of bytes of randomness to use."
msgstr ""
"要自行管理 Token 长度的用户,可以通过为 ``token_*`` 函数指定 :class:`int` 参数显式指定 Token "
"要使用多大的随机性。该参数以字节数表示随机性大小。"
#: ../../library/secrets.rst:117
msgid ""
"Otherwise, if no argument is provided, or if the argument is ``None``, the "
"``token_*`` functions will use a reasonable default instead."
msgstr "反之,如果未提供参数,或参数为 ``None``,则 ``token_*`` 函数将使用合理的默认值。"
#: ../../library/secrets.rst:122
msgid ""
"That default is subject to change at any time, including during maintenance "
"releases."
msgstr "该默认值随时可能会改变,比如,版本更新的时候。"
#: ../../library/secrets.rst:127
msgid "Other functions"
msgstr "其他功能"
#: ../../library/secrets.rst:131
msgid ""
"Return ``True`` if strings *a* and *b* are equal, otherwise ``False``, in "
"such a way as to reduce the risk of `timing attacks "
"<https://codahale.com/a-lesson-in-timing-attacks/>`_. See "
":func:`hmac.compare_digest` for additional details."
msgstr ""
"字符串 *a* 与 *b* 相等则返回 ``True``,否则返回 ``False``,这种方式可降低 `定时攻击 "
"<https://codahale.com/a-lesson-in-timing-attacks/>`_ 的风险。详见 "
":func:`hmac.compare_digest`。"
#: ../../library/secrets.rst:138
msgid "Recipes and best practices"
msgstr "应用技巧与最佳实践"
#: ../../library/secrets.rst:140
msgid ""
"This section shows recipes and best practices for using :mod:`secrets` to "
"manage a basic level of security."
msgstr "本节展示了一些使用 :mod:`secrets` 管理基本安全级别的应用技巧和最佳实践。"
#: ../../library/secrets.rst:143
msgid "Generate an eight-character alphanumeric password:"
msgstr "生成长度为八个字符的字母数字密码:"
#: ../../library/secrets.rst:155
msgid ""
"Applications should not `store passwords in a recoverable format "
"<http://cwe.mitre.org/data/definitions/257.html>`_, whether plain text or "
"encrypted. They should be salted and hashed using a cryptographically-"
"strong one-way (irreversible) hash function."
msgstr ""
"应用程序不能 `以可恢复的格式存储密码 "
"<http://cwe.mitre.org/data/definitions/257.html>`_,无论是用纯文本还是加密。 "
"它们应当使用高加密强度的单向(不可恢复)哈希函数来加盐并生成哈希值。"
#: ../../library/secrets.rst:161
msgid ""
"Generate a ten-character alphanumeric password with at least one lowercase "
"character, at least one uppercase character, and at least three digits:"
msgstr "生成长度为十个字符的字母数字密码,包含至少一个小写字母,至少一个大写字母以及至少三个数字:"
#: ../../library/secrets.rst:178
msgid "Generate an `XKCD-style passphrase <https://xkcd.com/936/>`_:"
msgstr "生成 `XKCD 风格的密码串 <https://xkcd.com/936/>`_:"
#: ../../library/secrets.rst:190
msgid ""
"Generate a hard-to-guess temporary URL containing a security token suitable "
"for password recovery applications:"
msgstr "生成临时密保 URL,包含密码恢复应用的安全 Token:"