Skip to content

Commit

Permalink
Fix argument order (#23)
Browse files Browse the repository at this point in the history
* Switch back to Nettle, see if tests pass

* Switch argument order
  • Loading branch information
randyzwitch authored Oct 21, 2018
1 parent d529347 commit 2991f02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OAuth.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ julia> oauth_sign_hmac_sha1("foo", "bar")
```
"""
function oauth_sign_hmac_sha1(message::String, signingkey::String)
base64encode(digest(MD_SHA1, signingkey, message))
base64encode(digest(MD_SHA1, message, signingkey))
end

"""
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using OAuth, Test
@test length(oauth_nonce(30)) == 30
@test length(oauth_nonce(32)) == 32

@test oauth_sign_hmac_sha1("randy", "zwitch") == "dR8PcWvTl2FyvVM417iTe/p1XV8="
@test oauth_sign_hmac_sha1("randy", "zwitch") == "WqKCG5iyhFiES3fWYVdWJWwinaY="

@test oauth_signing_key("9djdj82h48djs9d2", "kkk9d7dh3k39sjv7") == "9djdj82h48djs9d2&kkk9d7dh3k39sjv7"

Expand Down

0 comments on commit 2991f02

Please sign in to comment.