Passed
Push — mvp ( 8838f1...7a4c00 )
by Yohann
01:13
created

security.sha512()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
import hashlib
2
3
4
def sha512(password: str) -> str:
5
    """Return a sha512 hash of the given password."""
6
    return hashlib.sha512(password.encode('utf-8')).hexdigest()
7