mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Add stub for standard library crypt module (#1641)
This commit is contained in:
18
stdlib/2and3/crypt.pyi
Normal file
18
stdlib/2and3/crypt.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
import sys
|
||||
from typing import List, NamedTuple, Optional, Union
|
||||
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
class _Method: ...
|
||||
|
||||
METHOD_CRYPT: _Method
|
||||
METHOD_MD5: _Method
|
||||
METHOD_SHA256: _Method
|
||||
METHOD_SHA512: _Method
|
||||
|
||||
methods: List[_Method]
|
||||
|
||||
def mksalt(method: Optional[_Method] = ...) -> str: ...
|
||||
def crypt(word: str, salt: Optional[Union[str, _Method]] = ...) -> str: ...
|
||||
else:
|
||||
def crypt(word: str, salt: str) -> str: ...
|
||||
Reference in New Issue
Block a user