diff options
author | Frank Denis | 2025-03-12 01:09:42 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2025-03-12 20:43:23 +0100 |
commit | 11cf965026bff5763f5a425719daa82053cdd8e6 (patch) | |
tree | 2e547c7ff0bb76d5b8afbc2bacc5c30718fe0840 | |
parent | 48c8538a70e7904df0b17685bb2b277fbd92a7ae (diff) |
Allow 256-bit nonces even if is not useful
-rw-r--r-- | internal/cryptocore/cryptocore.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/cryptocore/cryptocore.go b/internal/cryptocore/cryptocore.go index 93fbe91..60a0ce3 100644 --- a/internal/cryptocore/cryptocore.go +++ b/internal/cryptocore/cryptocore.go @@ -92,7 +92,7 @@ func New(key []byte, aeadType AEADTypeEnum, IVBitLen int, useHKDF bool) *CryptoC if len(key) != KeyLen { log.Panicf("Unsupported key length of %d bytes", len(key)) } - if IVBitLen != 96 && IVBitLen != 128 && IVBitLen != chacha20poly1305.NonceSizeX*8 { + if IVBitLen != 96 && IVBitLen != 128 && IVBitLen != chacha20poly1305.NonceSizeX*8 && IVBitLen != aegis256x2.NonceSize*8 { log.Panicf("Unsupported IV length of %d bits", IVBitLen) } |