mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-24 04:52:39 +00:00
[Fixture] 完成用户推送task
This commit is contained in:
@@ -16,6 +16,7 @@ import calendar
|
||||
import threading
|
||||
|
||||
import paramiko
|
||||
from passlib.hash import sha512_crypt
|
||||
import sshpubkeys
|
||||
from itsdangerous import TimedJSONWebSignatureSerializer, JSONWebSignatureSerializer, \
|
||||
BadSignature, SignatureExpired
|
||||
@@ -322,4 +323,11 @@ def make_signature(access_key_secret, date=None):
|
||||
return content_md5(data)
|
||||
|
||||
|
||||
def encrypt_password(password):
|
||||
from passlib.hash import sha512_crypt
|
||||
if password:
|
||||
return sha512_crypt.using(rounds=5000).hash(password)
|
||||
return None
|
||||
|
||||
|
||||
signer = Signer()
|
||||
Reference in New Issue
Block a user