Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 172.70.80.111
128 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
nacl /
bindings /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
16.6
KB
-rw-r--r--
crypto_aead.py
15.23
KB
-rw-r--r--
crypto_box.py
9.9
KB
-rw-r--r--
crypto_core.py
13.41
KB
-rw-r--r--
crypto_generichash.py
8.64
KB
-rw-r--r--
crypto_hash.py
2.12
KB
-rw-r--r--
crypto_kx.py
6.57
KB
-rw-r--r--
crypto_pwhash.py
18.41
KB
-rw-r--r--
crypto_scalarmult.py
8.05
KB
-rw-r--r--
crypto_secretbox.py
2.85
KB
-rw-r--r--
crypto_secretstream.py
10.9
KB
-rw-r--r--
crypto_shorthash.py
2.54
KB
-rw-r--r--
crypto_sign.py
10.1
KB
-rw-r--r--
randombytes.py
1.53
KB
-rw-r--r--
sodium_core.py
1.01
KB
-rw-r--r--
utils.py
4.2
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : crypto_hash.py
# Copyright 2013 Donald Stufft and individual contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from nacl import exceptions as exc from nacl._sodium import ffi, lib from nacl.exceptions import ensure # crypto_hash_BYTES = lib.crypto_hash_bytes() crypto_hash_BYTES: int = lib.crypto_hash_sha512_bytes() crypto_hash_sha256_BYTES: int = lib.crypto_hash_sha256_bytes() crypto_hash_sha512_BYTES: int = lib.crypto_hash_sha512_bytes() def crypto_hash(message: bytes) -> bytes: """ Hashes and returns the message ``message``. :param message: bytes :rtype: bytes """ digest = ffi.new("unsigned char[]", crypto_hash_BYTES) rc = lib.crypto_hash(digest, message, len(message)) ensure(rc == 0, "Unexpected library error", raising=exc.RuntimeError) return ffi.buffer(digest, crypto_hash_BYTES)[:] def crypto_hash_sha256(message: bytes) -> bytes: """ Hashes and returns the message ``message``. :param message: bytes :rtype: bytes """ digest = ffi.new("unsigned char[]", crypto_hash_sha256_BYTES) rc = lib.crypto_hash_sha256(digest, message, len(message)) ensure(rc == 0, "Unexpected library error", raising=exc.RuntimeError) return ffi.buffer(digest, crypto_hash_sha256_BYTES)[:] def crypto_hash_sha512(message: bytes) -> bytes: """ Hashes and returns the message ``message``. :param message: bytes :rtype: bytes """ digest = ffi.new("unsigned char[]", crypto_hash_sha512_BYTES) rc = lib.crypto_hash_sha512(digest, message, len(message)) ensure(rc == 0, "Unexpected library error", raising=exc.RuntimeError) return ffi.buffer(digest, crypto_hash_sha512_BYTES)[:]
Close