-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsecrets.po
More file actions
195 lines (156 loc) · 13.6 KB
/
Copy pathsecrets.po
File metadata and controls
195 lines (156 loc) · 13.6 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <rffontenelle@gmail.com>, 2025
# Revisto <theRevisto@gmail.com>, 2025
# Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 12:56+0000\n"
"PO-Revision-Date: 2026-09-15 13:10+0330\n"
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.6\n"
msgid ":mod:`!secrets` --- Generate secure random numbers for managing secrets"
msgstr ":mod:`!secrets` --- تولید اعداد تصادفی امن برای مدیریت اسرار"
msgid "**Source code:** :source:`Lib/secrets.py`"
msgstr "**کد منبع:** :source:`Lib/secrets.py`"
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` برای تولید اعداد تصادفی قوی از نظر رمزنگاری استفاده میشود که برای مدیریت دادههایی مانند گذرواژهها، احراز هویت حساب، توکنهای امنیتی و رازهای مرتبط مناسب هستند."
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` استفاده شود؛ زیرا آن مولد برای مدلسازی و شبیهسازی طراحی شده است، نه برای امنیت یا رمزنگاری."
msgid ":pep:`506`"
msgstr ":pep:`506`"
msgid "Random numbers"
msgstr "اعداد تصادفی"
msgid "The :mod:`!secrets` module provides access to the most secure source of randomness that your operating system provides."
msgstr "ماژول :mod:`!secrets` دسترسی به امنترین منبع تصادف را که سیستمعامل شما ارائه میدهد، فراهم میکند."
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` را ببینید."
msgid "Return a randomly chosen element from a non-empty sequence."
msgstr "یک عنصر انتخابشده بهصورت تصادفی از یک دنبالهی غیرخالی برمیگرداند."
msgid "Return a random int in the range [0, *exclusive_upper_bound*)."
msgstr "یک عدد صحیح تصادفی در بازهی [0, *exclusive_upper_bound*) برمیگرداند."
msgid "Return a non-negative int with *k* random bits."
msgstr "یک عدد صحیح نامنفی با *k* بیت تصادفی برمیگرداند."
msgid "Generating tokens"
msgstr "تولید توکنها"
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` توابعی برای تولید توکنهای امن فراهم میکند که برای کاربردهایی مانند بازنشانی گذرواژه، URLهایی که حدس زدن آنها دشوار است و موارد مشابه مناسب هستند."
msgid "Return a random byte string containing *nbytes* number of bytes."
msgstr "یک رشته بایت تصادفی شامل تعداد *nbytes* بایت برمیگرداند."
msgid "If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY` is used instead."
msgstr "اگر *nbytes* مشخص نشده باشد یا ``None`` باشد، بهجای آن از :const:`DEFAULT_ENTROPY` استفاده میشود."
msgid ""
">>> token_bytes(16)\n"
"b'\\xebr\\x17D*t\\xae\\xd4\\xe3S\\xb6\\xe2\\xebP1\\x8b'"
msgstr ""
">>> token_bytes(16)\n"
"b'\\xebr\\x17D*t\\xae\\xd4\\xe3S\\xb6\\xe2\\xebP1\\x8b'"
msgid "Return a random text string, in hexadecimal. The string has *nbytes* random bytes, each byte converted to two hex digits."
msgstr "یک رشته متنی تصادفی را بهصورت مبنای شانزده برمیگرداند. این رشته *nbytes* بایت تصادفی دارد که هر بایت به دو رقم مبنای شانزده تبدیل میشود."
msgid ""
">>> token_hex(16)\n"
"'f9bf78b9a18ce6d46a0cd2b0b86df9da'"
msgstr ""
">>> token_hex(16)\n"
"'f9bf78b9a18ce6d46a0cd2b0b86df9da'"
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."
msgstr "یک رشته متنی تصادفی و امن برای URL برمیگرداند که شامل *nbytes* بایت تصادفی است. این متن بهصورت Base64 کدگذاریشده است، بنابراین بهطور میانگین هر بایت تقریباً معادل ۱٫۳ نویسه میشود."
msgid ""
">>> token_urlsafe(16)\n"
"'Drmhze6EPcv0fN_81Bj-nA'"
msgstr ""
">>> token_urlsafe(16)\n"
"'Drmhze6EPcv0fN_81Bj-nA'"
msgid "How many bytes should tokens use?"
msgstr "توکنها باید از چند بایت استفاده کنند؟"
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 "برای ایمن بودن در برابر `حملات جستجوی فراگیر (brute-force attacks) <https://fa.wikipedia.org/wiki/حمله_جستجوی_فراگیر>`_، توکنها باید از تصادفیبودن کافی برخوردار باشند. متأسفانه، آنچه کافی در نظر گرفته میشود لزوماً با قدرتمندتر شدن کامپیوترها و توانایی آنها برای انجام حدسهای بیشتر در بازهی زمانی کوتاهتر، افزایش خواهد یافت. از سال ۲۰۱۵، تصور میشود که ۳۲ بایت (۲۵۶ بیت) تصادفیبودن برای مورد استفادهی معمولی که از ماژول :mod:`!secrets` انتظار میرود، کافی است."
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 "اگر میخواهید طول توکنهای خود را مدیریت کنید، میتوانید با دادن یک آرگومان :class:`int` به توابع مختلف ``token_*``، بهصراحت مشخص کنید که چه میزان تصادفی بودن برای توکنها استفاده میشود. آن آرگومان بهعنوان تعداد بایتهای تصادفی برای استفاده در نظر گرفته میشود."
msgid "Otherwise, if no argument is provided, or if the argument is ``None``, the ``token_*`` functions use :const:`DEFAULT_ENTROPY` instead."
msgstr "در غیر این صورت، اگر هیچ آرگومانی ارائه نشود، یا اگر آرگومان ``None`` باشد، توابع ``token_*`` بهجای آن از :const:`DEFAULT_ENTROPY` استفاده میکنند."
msgid "Default number of bytes of randomness used by the ``token_*`` functions."
msgstr "تعداد پیشفرض بایتهای تصادفی که توسط توابع ``token_*`` استفاده میشود."
msgid "The exact value is subject to change at any time, including during maintenance releases."
msgstr "مقدار دقیق ممکن است در هر زمانی، از جمله در نسخههای نگهداری، تغییر کند."
msgid "Other functions"
msgstr "توابع دیگر"
msgid "Return ``True`` if strings or :term:`bytes-like objects <bytes-like object>` *a* and *b* are equal, otherwise ``False``, using a \"constant-time compare\" to reduce the risk of `timing attacks <https://web.archive.org/web/20250815071532/https://codahale.com/a-lesson-in-timing-attacks/>`__. See :func:`hmac.compare_digest` for additional details."
msgstr "اگر رشتهها یا :term:`اشیای شبهبایت <bytes-like object>` *a* و *b* برابر باشند، ``True`` را برمیگرداند، در غیر این صورت ``False`` را برمیگرداند و برای کاهش خطر `حملات زمانسنجی <https://web.archive.org/web/20250815071532/https://codahale.com/a-lesson-in-timing-attacks/>`__ از «مقایسه با زمان ثابت» استفاده میکند. برای جزئیات بیشتر، :func:`hmac.compare_digest` را ببینید."
msgid "Recipes and best practices"
msgstr "دستورعملها و بهترین روشها"
msgid "This section shows recipes and best practices for using :mod:`!secrets` to manage a basic level of security."
msgstr "این بخش، دستور پختها و بهترین شیوهها را برای استفاده از :mod:`!secrets` جهت مدیریت یک سطح پایه از امنیت نشان میدهد."
msgid "Generate an eight-character alphanumeric password:"
msgstr "تولید یک گذرواژهی الفباییعددی هشتنویسهای:"
msgid ""
"import string\n"
"import secrets\n"
"alphabet = string.ascii_letters + string.digits\n"
"password = ''.join(secrets.choice(alphabet) for i in range(8))"
msgstr ""
"import string\n"
"import secrets\n"
"alphabet = string.ascii_letters + string.digits\n"
"password = ''.join(secrets.choice(alphabet) for i in range(8))"
msgid "Applications should not :cwe:`store passwords in a recoverable format <257>`, whether plain text or encrypted. They should be salted and hashed using a cryptographically strong one-way (irreversible) hash function."
msgstr "برنامهها نباید :cwe:`رمزهای عبور را در قالبی قابلبازیابی ذخیره کنند <257>`، چه بهصورت متن ساده و چه بهصورت رمزنگاریشده. این رمزهای عبور باید با استفاده از یک تابع هش یکطرفه (غیرقابلبازگشت) و قوی از نظر رمزنگاری، نمکگذاری و هشدهی شوند."
msgid "Generate a ten-character alphanumeric password with at least one lowercase character, at least one uppercase character, and at least three digits:"
msgstr "یک گذرواژه الفباییعددی ۱۰ نویسهای با دستکم ۱ نویسه کوچک، دستکم ۱ نویسه بزرگ و دستکم ۳ رقم تولید کنید:"
msgid ""
"import string\n"
"import secrets\n"
"alphabet = string.ascii_letters + string.digits\n"
"while True:\n"
" password = ''.join(secrets.choice(alphabet) for i in range(10))\n"
" if (any(c.islower() for c in password)\n"
" and any(c.isupper() for c in password)\n"
" and sum(c.isdigit() for c in password) >= 3):\n"
" break"
msgstr ""
"import string\n"
"import secrets\n"
"alphabet = string.ascii_letters + string.digits\n"
"while True:\n"
" password = ''.join(secrets.choice(alphabet) for i in range(10))\n"
" if (any(c.islower() for c in password)\n"
" and any(c.isupper() for c in password)\n"
" and sum(c.isdigit() for c in password) >= 3):\n"
" break"
msgid "Generate an `XKCD-style passphrase <https://xkcd.com/936/>`_:"
msgstr "یک `عبارت عبور به سبک XKCD <https://xkcd.com/936/>`_ تولید کنید:"
msgid ""
"import secrets\n"
"# On standard Linux systems, use a convenient dictionary file.\n"
"# Other platforms may need to provide their own word-list.\n"
"with open('/usr/share/dict/words') as f:\n"
" words = [word.strip() for word in f]\n"
" password = ' '.join(secrets.choice(words) for i in range(4))"
msgstr ""
"import secrets\n"
"# On standard Linux systems, use a convenient dictionary file.\n"
"# Other platforms may need to provide their own word-list.\n"
"with open('/usr/share/dict/words') as f:\n"
" words = [word.strip() for word in f]\n"
" password = ' '.join(secrets.choice(words) for i in range(4))"
msgid "Generate a hard-to-guess temporary URL containing a security token suitable for password recovery applications:"
msgstr "یک URL موقت که حدس زدن آن دشوار است و حاوی یک توکن امنیتی مناسب برای برنامههای بازیابی گذرواژه است، تولید کنید:"
msgid ""
"import secrets\n"
"url = 'https://example.com/reset=' + secrets.token_urlsafe()"
msgstr ""
"import secrets\n"
"url = 'https://example.com/reset=' + secrets.token_urlsafe()"