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 ( import (
"crypto" "crypto"
"crypto/rand"
"crypto/rsa" "crypto/rsa"
"crypto/sha256" "crypto/sha256"
"crypto/x509" "crypto/x509"
"crypto/rand"
"encoding/pem" "encoding/pem"
"errors" "errors"
) )

View File

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

View File

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

View File

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