File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
from __future__ import unicode_literals
18
18
19
- __version__ = '1.0.1 '
19
+ __version__ = '1.0.2 '
20
20
__author__ = 'LINE Corporation'
21
21
__copyright__ = 'Copyright 2016, LINE Corporation'
22
22
__license__ = 'Apache 2.0'
Original file line number Diff line number Diff line change 37
37
38
38
if hasattr (hmac , "compare_digest" ):
39
39
def compare_digest (val1 , val2 ):
40
- """compare_digest method.
40
+ """compare_digest function.
41
+
42
+ If hmac module has compare_digest function, use it.
43
+ Or not, use linebot.utils.safe_compare_digest.
41
44
42
45
:param val1: string or bytes for compare
43
46
:type val1: str | bytes
@@ -49,7 +52,10 @@ def compare_digest(val1, val2):
49
52
return hmac .compare_digest (val1 , val2 )
50
53
else :
51
54
def compare_digest (val1 , val2 ):
52
- """compare_digest method.
55
+ """compare_digest function.
56
+
57
+ If hmac module has compare_digest function, use it.
58
+ Or not, use linebot.utils.safe_compare_digest.
53
59
54
60
:param val1: string or bytes for compare
55
61
:type val1: str | bytes
You can’t perform that action at this time.
0 commit comments