REDROOM
PHP 8.3.30
Path:
Logout
Edit File
Size: 1.46 KB
Close
//opt/imunify360/venv/lib64/python3.11/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py
Text
Base64
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import annotations import abc from cryptography import utils # This exists to break an import cycle. It is normally accessible from the # ciphers module. class CipherAlgorithm(metaclass=abc.ABCMeta): @property @abc.abstractmethod def name(self) -> str: """ A string naming this mode (e.g. "AES", "Camellia"). """ @property @abc.abstractmethod def key_sizes(self) -> frozenset[int]: """ Valid key sizes for this algorithm in bits """ @property @abc.abstractmethod def key_size(self) -> int: """ The size of the key being used as an integer in bits (e.g. 128, 256). """ class BlockCipherAlgorithm(CipherAlgorithm): key: bytes @property @abc.abstractmethod def block_size(self) -> int: """ The size of a block as an integer in bits (e.g. 64, 128). """ def _verify_key_size(algorithm: CipherAlgorithm, key: bytes) -> bytes: # Verify that the key is instance of bytes utils._check_byteslike("key", key) # Verify that the key size matches the expected key size if len(key) * 8 not in algorithm.key_sizes: raise ValueError( f"Invalid key size ({len(key) * 8}) for {algorithm.name}." ) return key
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 6 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
asymmetric
DIR
-
drwxr-xr-x
2026-03-03 09:07:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ciphers
DIR
-
drwxr-xr-x
2026-03-03 09:07:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
kdf
DIR
-
drwxr-xr-x
2026-03-03 09:07:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
serialization
DIR
-
drwxr-xr-x
2026-03-03 09:07:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
twofactor
DIR
-
drwxr-xr-x
2026-03-03 09:07:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-03-03 09:07:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cmac.py
338 B
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
constant_time.py
422 B
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hashes.py
4.97 KB
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hmac.py
423 B
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
keywrap.py
5.52 KB
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
padding.py
5.39 KB
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
poly1305.py
355 B
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_asymmetric.py
532 B
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_cipheralgorithm.py
1.46 KB
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_serialization.py
5.02 KB
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
180 B
lrw-r--r--
2026-02-13 12:40:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).