Adds unit testing for jws

This commit is contained in:
2015-08-18 18:34:23 +02:00
parent 00c5853b45
commit abe3cbab1f
6 changed files with 187 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ func NewHMAC256Signer(key []byte) Signer {
// NewHMAC384Signer returs a HMACSigner using a SHA384 hash.
func NewHMAC384Signer(key []byte) Signer {
return &HMACSigner{
name: "HS256",
name: "HS384",
hash: crypto.SHA384,
key: key,
}
@@ -58,8 +58,8 @@ func NewHMAC384Signer(key []byte) Signer {
// NewHMAC512Signer returs a HMACSigner using a SHA512 hash.
func NewHMAC512Signer(key []byte) Signer {
return &HMACSigner{
name: "HS256",
hash: crypto.SHA384,
name: "HS512",
hash: crypto.SHA512,
key: key,
}
}