Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
aliyun-python-sdk-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张允禹
aliyun-python-sdk-core
Commits
83b8d863
Commit
83b8d863
authored
Jun 26, 2017
by
张允禹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sign
parent
76082e7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
sha_hmac1.py
aliyunsdkcore/auth/sha_hmac1.py
+2
-0
No files found.
aliyunsdkcore/auth/sha_hmac1.py
View file @
83b8d863
...
@@ -25,6 +25,8 @@ import base64
...
@@ -25,6 +25,8 @@ import base64
def
get_sign_string
(
source
,
secret
):
def
get_sign_string
(
source
,
secret
):
secret
=
secret
.
encode
()
source
=
source
.
encode
()
h
=
hmac
.
new
(
secret
,
source
,
hashlib
.
sha1
)
h
=
hmac
.
new
(
secret
,
source
,
hashlib
.
sha1
)
signature
=
base64
.
encodestring
(
h
.
digest
())
.
strip
()
signature
=
base64
.
encodestring
(
h
.
digest
())
.
strip
()
return
signature
return
signature
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment