diff --git a/library/secrets.po b/library/secrets.po index d82f9ec496..172eee20dd 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -1,12 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2018, Python Software Foundation # This file is distributed under the same license as the Python package. +# +# Translators: +# bonzo , 2021 msgid "" msgstr "" "Project-Id-Version: Python 3.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-20 18:08+0800\n" -"PO-Revision-Date: 2018-07-15 18:56+0800\n" +"PO-Revision-Date: 2021-03-10 23:40+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -14,14 +17,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"Last-Translator: \n" +"X-Generator: Poedit 2.4.2\n" #: ../../library/secrets.rst:2 msgid ":mod:`secrets` --- Generate secure random numbers for managing secrets" -msgstr "" +msgstr ":mod:`secrets` --- 產生用於管理機密的安全亂數" #: ../../library/secrets.rst:16 msgid "**Source code:** :source:`Lib/secrets.py`" -msgstr "" +msgstr "**原始碼:** :source:`Lib/secrets.py`" #: ../../library/secrets.rst:20 msgid "" @@ -29,27 +34,33 @@ msgid "" "random numbers suitable for managing data such as passwords, account " "authentication, security tokens, and related secrets." msgstr "" +":mod:`secrets` 模組可用於產生高加密強度的亂數,適合用來管理諸如密碼、帳號認" +"證、安全性權杖(security tokens)這類資料,以及管理其他相關的機密資料。" #: ../../library/secrets.rst:24 msgid "" -"In particularly, :mod:`secrets` should be used in preference to the default " +"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` 模組中的預設偽亂" +"數產生器(pseudo-random number generator),該模組被設計用於建模和模擬,而非用" +"於安全性和加密。" #: ../../library/secrets.rst:30 msgid ":pep:`506`" -msgstr "" +msgstr ":pep:`506`" #: ../../library/secrets.rst:34 msgid "Random numbers" -msgstr "" +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 "" @@ -57,22 +68,24 @@ msgid "" "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 "" +msgstr "從一非空序列中,回傳一個隨機選取的元素。" #: ../../library/secrets.rst:51 msgid "Return a random int in the range [0, *n*)." -msgstr "" +msgstr "回傳一個 [0, *n*) 範圍之內的隨機整數。" #: ../../library/secrets.rst:55 msgid "Return an int with *k* random bits." -msgstr "" +msgstr "回傳一個具 *k* 個隨機位元的整數。" #: ../../library/secrets.rst:59 msgid "Generating tokens" -msgstr "" +msgstr "產生權杖(token)" #: ../../library/secrets.rst:61 msgid "" @@ -80,12 +93,16 @@ msgid "" "suitable for applications such as password resets, hard-to-guess URLs, and " "similar." msgstr "" +":mod:`secrets` 模組提供了一些產生安全性權杖的函式,適合用於諸如重設密碼、難以" +"猜測的 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* 為 " +"``None`` 或未提供,則會使用一合理預設值。" #: ../../library/secrets.rst:79 msgid "" @@ -93,6 +110,9 @@ msgid "" "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 "" @@ -101,10 +121,13 @@ msgid "" "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 "" +msgstr "權杖應當使用多少個位元組?" #: ../../library/secrets.rst:104 msgid "" @@ -116,6 +139,11 @@ msgid "" "is sufficient for the typical use-case expected for the :mod:`secrets` " "module." msgstr "" +"為了在面對 `暴力攻擊 `_ 時" +"能保證安全,權杖必須具有足夠的隨機性。 不幸的是,對隨機性是否足夠的標準,會隨" +"著電腦越來越強大並能夠在更短時間內進行更多猜測而不斷提高。 在 2015 年時,人們" +"認為 32 位元組(256 位元)的隨機性對於 :mod:`secrets` 模組所預期的一般使用場" +"景來說是足夠的。" #: ../../library/secrets.rst:112 msgid "" @@ -124,22 +152,27 @@ msgid "" "argument to the various ``token_*`` functions. That argument is taken as " "the number of bytes of randomness to use." msgstr "" +"對於想自行管理權杖長度的使用者,你可以對各種 ``token_*`` 函式明白地指定 :" +"class:`int` 引數(argument)來指定權杖要使用的隨機性程度。 該引" +"數以位元組數來表示要使用的隨機性程度。" #: ../../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 "" +msgstr "該預設值可能在任何時候被改變,包括在維護版本更新的時候。" #: ../../library/secrets.rst:127 msgid "Other functions" -msgstr "" +msgstr "其他函式" #: ../../library/secrets.rst:131 msgid "" @@ -148,20 +181,24 @@ msgid "" "lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for additional " "details." msgstr "" +"如果字串 *a* 與 *b* 相等則回傳 ``True``,否則回傳 ``False``,這樣的處理方式可" +"降低 `時序攻擊 `_ 的風險。 " +"請參閱 :func:`hmac.compare_digest` 以了解更多細節。" #: ../../library/secrets.rst:138 msgid "Recipes and best practices" -msgstr "" +msgstr "應用技巧和典範實務(best practices)" #: ../../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 "" +msgstr "產生八個字元長的字母數字密碼:" #: ../../library/secrets.rst:155 msgid "" @@ -170,19 +207,24 @@ msgid "" "They should be salted and hashed using a cryptographically-strong one-way " "(irreversible) hash function." msgstr "" +"應用程式不能 `以可復原的格式存儲密碼 `_,無論是用純文本還是經過加密。 它們應當先加鹽(salt),再使用" +"高加密強度的單向(不可逆)雜湊函數來產生雜湊值。" #: ../../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 `_:" -msgstr "" +msgstr "產生 `XKCD 風格的 passphrase `_:" #: ../../library/secrets.rst:190 msgid "" "Generate a hard-to-guess temporary URL containing a security token suitable " "for password recovery applications:" -msgstr "" +msgstr "產生難以猜測的暫時性 URL,內含回復密碼時所用的一個安全性權杖:"