This commit is contained in:
Dave Grijalva 2012-07-06 17:02:20 -07:00
parent cbb3bae3aa
commit 0a26d2272f
6 changed files with 25 additions and 25 deletions

View File

@ -2,10 +2,10 @@ package jwt
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"crypto/rand"
"encoding/pem"
"errors"
)

View File

@ -49,7 +49,6 @@ func TestRS256Verify(t *testing.T) {
}
}
func TestRS256Sign(t *testing.T) {
file, _ := os.Open("test/sample_key")
buf := new(bytes.Buffer)

View File

@ -1,9 +1,9 @@
package jwt
import (
"crypto/sha256"
"crypto/hmac"
"bytes"
"crypto/hmac"
"crypto/sha256"
"errors"
)

View File

@ -24,6 +24,7 @@ var sha256TestData = []struct {
false,
},
}
// Sample data from http://tools.ietf.org/html/draft-jones-json-web-signature-04#appendix-A.1
var sha256TestKey = []byte{
3, 35, 53, 75, 43, 15, 165, 188, 131, 126, 6, 101, 119, 123, 166,