Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 14 for swordfish (0.06 seconds)

  1. docs/en/docs/advanced/security/http-basic-auth.md

    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    This would be similar to:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # Return some error
        ...
    ```
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-05 18:13
    - 5K bytes
    - Click Count (0)
  2. docs/ko/docs/advanced/security/http-basic-auth.md

    그런 다음 `secrets.compare_digest()`를 사용해 `credentials.username`이 `"stanleyjobson"`이고 `credentials.password`가 `"swordfish"`인지 확실히 확인할 수 있습니다.
    
    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    이는 다음과 비슷합니다:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # 어떤 오류를 반환
        ...
    ```
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-20 14:06
    - 5.9K bytes
    - Click Count (0)
  3. docs/ja/docs/advanced/security/http-basic-auth.md

    そのうえで、`secrets.compare_digest()` を使って、`credentials.username` が `"stanleyjobson"` であり、`credentials.password` が `"swordfish"` であることを確認します。
    
    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    これは次のようなコードに相当します:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # 何らかのエラーを返す
        ...
    ```
    
    しかし `secrets.compare_digest()` を使うことで、「タイミング攻撃」と呼ばれる種類の攻撃に対して安全になります。
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-20 14:07
    - 6.4K bytes
    - Click Count (0)
  4. docs/zh/docs/advanced/security/http-basic-auth.md

    然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。
    
    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    这类似于:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # Return some error
        ...
    ```
    
    但使用 `secrets.compare_digest()`,可以防御**时差攻击**,更加安全。
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-20 17:06
    - 4.4K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/advanced/security/http-basic-auth.md

    接著我們可以使用 `secrets.compare_digest()` 來確認 `credentials.username` 等於 `"stanleyjobson"`,而 `credentials.password` 等於 `"swordfish"`。
    
    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    這大致等同於:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # 回傳錯誤
        ...
    ```
    
    但藉由使用 `secrets.compare_digest()`,可以防禦一種稱為「計時攻擊」的攻擊。
    
    ### 計時攻擊 { #timing-attacks }
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-20 17:05
    - 4.7K bytes
    - Click Count (0)
  6. docs_src/security/tutorial007_py310.py

        is_correct_username = secrets.compare_digest(
            current_username_bytes, correct_username_bytes
        )
        current_password_bytes = credentials.password.encode("utf8")
        correct_password_bytes = b"swordfish"
        is_correct_password = secrets.compare_digest(
            current_password_bytes, correct_password_bytes
        )
        if not (is_correct_username and is_correct_password):
            raise HTTPException(
    Created: 2026-04-05 07:19
    - Last Modified: 2026-02-12 13:19
    - 1.1K bytes
    - Click Count (0)
  7. docs_src/security/tutorial007_an_py310.py

        is_correct_username = secrets.compare_digest(
            current_username_bytes, correct_username_bytes
        )
        current_password_bytes = credentials.password.encode("utf8")
        correct_password_bytes = b"swordfish"
        is_correct_password = secrets.compare_digest(
            current_password_bytes, correct_password_bytes
        )
        if not (is_correct_username and is_correct_password):
            raise HTTPException(
    Created: 2026-04-05 07:19
    - Last Modified: 2026-02-12 13:19
    - 1.1K bytes
    - Click Count (0)
  8. docs/ru/docs/advanced/security/http-basic-auth.md

    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    Это было бы похоже на:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # Вернуть ошибку
        ...
    ```
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-19 17:56
    - 7.4K bytes
    - Click Count (0)
  9. docs/tr/docs/advanced/security/http-basic-auth.md

    Sonra `secrets.compare_digest()` kullanarak `credentials.username`’in `"stanleyjobson"` ve `credentials.password`’ün `"swordfish"` olduğundan emin olabiliriz.
    
    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    Bu, kabaca şuna benzer olurdu:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # Bir hata döndür
        ...
    ```
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-20 07:53
    - 5.5K bytes
    - Click Count (0)
  10. docs/pt/docs/advanced/security/http-basic-auth.md

    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    Isso seria parecido com:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # Return some error
        ...
    ```
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-19 18:20
    - 5.2K bytes
    - Click Count (0)
Back to Top