WIP: Add compression to API (#91)

* Add compression to API

* Add docs

* Use defaults for a simpler interface

* Update x/crypto

* Fix ecdsa key types for lib update
This commit is contained in:
wussler 2020-11-04 17:40:45 +01:00 committed by GitHub
parent 9503b68f0c
commit 371d429001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 177 additions and 31 deletions

View file

@ -257,17 +257,21 @@ func TestFailCheckIntegrity(t *testing.T) {
k1.entity.PrivateKey.PrivateKey = k2.entity.PrivateKey.PrivateKey // Swap private keys
k3, err := k1.Copy()
isVerified, err := k1.Check()
if err != nil {
t.Fatal("Expected no error while locking keyring kr3, got:", err)
}
isVerified, err := k3.Check()
if err != nil {
t.Fatal("Expected no error while checking correct passphrase, got:", err)
t.Fatal("Expected no error while checking key, got:", err)
}
assert.Exactly(t, false, isVerified)
serialized, err := k1.Serialize()
if err != nil {
t.Fatal("Expected no error while serializing keyring kr3, got:", err)
}
_, err = NewKey(serialized)
assert.Error(t, err)
}
func TestGetPublicKey(t *testing.T) {