crypto: Abstract pubkey / signature size when known to constants (#1808)

* crypto: Abstract pubkey / signature size when known to constants

* Created PubKeyEd25519Size as 32
* Created PubkeySecp256k1Size as 33
* Created SignatureEd25519Size as 64

* Remove extraneous message from changelog
This commit is contained in:
Dev Ojha
2018-06-29 00:08:01 -07:00
committed by Anton Kaliaev
parent e26d6ed448
commit 41733b46b9
3 changed files with 16 additions and 7 deletions

View File

@@ -25,8 +25,10 @@ type Signature interface {
var _ Signature = SignatureEd25519{}
const SignatureEd25519Size = 64
// Implements Signature
type SignatureEd25519 [64]byte
type SignatureEd25519 [SignatureEd25519Size]byte
func (sig SignatureEd25519) Bytes() []byte {
bz, err := cdc.MarshalBinaryBare(sig)