aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv6/doc.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2019-08-22 21:14:06 +0800
committerGitHub <noreply@github.com>2019-08-22 21:14:06 +0800
commit54b271a86dd748f3b0bcebeaf678dc34e0d6177a (patch)
tree0a24f87f9dde9144b956a6adc54ba72c18f5ccd3 /whisper/whisperv6/doc.go
parentb90cdbaa79cfe438aab0f1389d35980f3d38ec84 (diff)
downloadgo-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.gz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.bz2
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.lz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.xz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.zst
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.zip
crypto: add SignatureLength constant and use it everywhere (#19996)
Original change by @jpeletier
Diffstat (limited to 'whisper/whisperv6/doc.go')
-rw-r--r--whisper/whisperv6/doc.go14
1 files changed, 8 insertions, 6 deletions
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