From 54b271a86dd748f3b0bcebeaf678dc34e0d6177a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 22 Aug 2019 15:14:06 +0200 Subject: crypto: add SignatureLength constant and use it everywhere (#19996) Original change by @jpeletier --- whisper/whisperv6/doc.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'whisper/whisperv6') diff --git a/whisper/whisperv6/doc.go b/whisper/whisperv6/doc.go index 529bf3d2d..44c0c3271 100644 --- a/whisper/whisperv6/doc.go +++ b/whisper/whisperv6/doc.go @@ -34,6 +34,8 @@ package whisperv6 import ( "time" + + "github.com/ethereum/go-ethereum/crypto" ) // Whisper protocol parameters @@ -54,12 +56,12 @@ const ( SizeMask = byte(3) // mask used to extract the size of payload size field from the flags signatureFlag = byte(4) - TopicLength = 4 // in bytes - signatureLength = 65 // in bytes - aesKeyLength = 32 // in bytes - aesNonceLength = 12 // in bytes; for more info please see cipher.gcmStandardNonceSize & aesgcm.NonceSize() - keyIDSize = 32 // in bytes - BloomFilterSize = 64 // in bytes + TopicLength = 4 // in bytes + signatureLength = crypto.SignatureLength // in bytes + aesKeyLength = 32 // in bytes + aesNonceLength = 12 // in bytes; for more info please see cipher.gcmStandardNonceSize & aesgcm.NonceSize() + keyIDSize = 32 // in bytes + BloomFilterSize = 64 // in bytes flagsLength = 1 EnvelopeHeaderLength = 20 -- cgit v1.2.3