Skip to content

Commit

Permalink
Merge pull request #211 from ojab/sha512256_fix
Browse files Browse the repository at this point in the history
Fix typo in HS512256 algorithm description
  • Loading branch information
excpt authored Jul 11, 2017
2 parents 9fa2668 + 9bf5907 commit 588e92f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ puts decoded_token
**HMAC** (default: HS256)

* HS256 - HMAC using SHA-256 hash algorithm (default)
* HS512256 - HMAC using SHA-512/256 hash algorithm (only available with RbNaCl; see note below)
* HS512256 - HMAC using SHA-512-256 hash algorithm (only available with RbNaCl; see note below)
* HS384 - HMAC using SHA-384 hash algorithm
* HS512 - HMAC using SHA-512 hash algorithm

Expand All @@ -85,7 +85,7 @@ decoded_token = JWT.decode token, hmac_secret, true, { :algorithm => 'HS256' }
puts decoded_token
```

Note: If [RbNaCl](https://github.com/cryptosphere/rbnacl) is loadable, ruby-jwt will use it for HMAC-SHA256, HMAC-SHA512/256, and HMAC-SHA512. RbNaCl enforces a maximum key size of 32 bytes for these algorithms.
Note: If [RbNaCl](https://github.com/cryptosphere/rbnacl) is loadable, ruby-jwt will use it for HMAC-SHA256, HMAC-SHA512-256, and HMAC-SHA512. RbNaCl enforces a maximum key size of 32 bytes for these algorithms.

[RbNaCl](https://github.com/cryptosphere/rbnacl) requires
[libsodium](https://github.com/jedisct1/libsodium), it can be installed
Expand Down

0 comments on commit 588e92f

Please sign in to comment.