John starr rocks!

This commit is contained in:
didier.amyot committed 2014-10-31 16:51:49 -07:00
1 parent d2cd50b2e3
commit 0095eb7159
12 files changed
+343 -9

No files matched your search

+12
View File
@@ -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()
}
}