mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
Clarify that cryptography's Fernet accepts text keys (#4061)
* Clarify that cryptography's Fernet accepts text keys * simplify code Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
4
third_party/2and3/cryptography/fernet.pyi
vendored
4
third_party/2and3/cryptography/fernet.pyi
vendored
@@ -1,9 +1,9 @@
|
||||
from typing import List, Optional
|
||||
from typing import List, Optional, Union, Text
|
||||
|
||||
class InvalidToken(Exception): ...
|
||||
|
||||
class Fernet(object):
|
||||
def __init__(self, key: bytes) -> None: ...
|
||||
def __init__(self, key: Union[bytes, Text]) -> None: ...
|
||||
def decrypt(self, token: bytes, ttl: Optional[int] = ...) -> bytes: ...
|
||||
def encrypt(self, data: bytes) -> bytes: ...
|
||||
def extract_timestamp(self, token: bytes) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user