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

@ -57,7 +57,7 @@ func clearPrivateKey(privateKey interface{}) error {
return clearElGamalPrivateKey(priv)
case *ecdsa.PrivateKey:
return clearECDSAPrivateKey(priv)
case ed25519.PrivateKey:
case *ed25519.PrivateKey:
return clearEdDSAPrivateKey(priv)
case *ecdh.PrivateKey:
return clearECDHPrivateKey(priv)
@ -115,8 +115,8 @@ func clearECDSAPrivateKey(priv *ecdsa.PrivateKey) error {
return nil
}
func clearEdDSAPrivateKey(priv ed25519.PrivateKey) error {
clearMem(priv)
func clearEdDSAPrivateKey(priv *ed25519.PrivateKey) error {
clearMem(*priv)
return nil
}