Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
ll committed May 20, 2021
1 parent 0418a0a commit fb9bfb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyefun/commonlyUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
from collections import OrderedDict
import operator
from .dirkBase import *
import hashlib


def 取sha1(data, 哈希算法='sha1'):
return ub.hash_data(data, hasher=哈希算法)

def 取md5(内容, 编码="utf-8"):
MD5 = hashlib.md5()
MD5.update(内容.encode(encoding=编码))
return MD5.hexdigest()

def 取哈希(data, 哈希算法='sha1'):
return ub.hash_data(data, hasher=哈希算法)
Expand Down

0 comments on commit fb9bfb0

Please sign in to comment.