crypto: Remove interface from crypto.Signature

Signatures are now []byte, which saves on the number of bytes after
amino encoding

(squash this) address Ismail's comment
This commit is contained in:
ValarDragon
2018-08-01 17:02:05 -07:00
committed by Ethan Buchman
parent d6a666b445
commit f903947ff3
21 changed files with 69 additions and 182 deletions

View File

@ -6,7 +6,7 @@ import (
type PrivKey interface {
Bytes() []byte
Sign(msg []byte) (Signature, error)
Sign(msg []byte) ([]byte, error)
PubKey() PubKey
Equals(PrivKey) bool
}
@ -19,16 +19,10 @@ type Address = cmn.HexBytes
type PubKey interface {
Address() Address
Bytes() []byte
VerifyBytes(msg []byte, sig Signature) bool
VerifyBytes(msg []byte, sig []byte) bool
Equals(PubKey) bool
}
type Signature interface {
Bytes() []byte
IsZero() bool
Equals(Signature) bool
}
type Symmetric interface {
Keygen() []byte
Encrypt(plaintext []byte, secret []byte) (ciphertext []byte)