John starr rocks!
This commit is contained in:
1 parent
d2cd50b2e3
commit
0095eb7159
12 files changed
+343
-9
No files matched your search
@@ -41,3 +41,15 @@ func TestRSAPublicKeyJsonification(t *testing.T) {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestRSAPublicKeyJsonificationFromString(t *testing.T) {
|
||||
data := []byte(`{"N":"3ff","E":89}`)
|
||||
key := new(RSAPublicKey)
|
||||
if err := json.Unmarshal(data, key); err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
if !reflect.DeepEqual(key, &RSAPublicKey{B(1023), 89}) {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user