add the AEAD_LIMIT_REACHED error code

This commit is contained in:
Marten Seemann
2020-09-07 17:45:45 +07:00
parent ba9f98d83a
commit 3a4de205b0
2 changed files with 5 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ const (
ApplicationError ErrorCode = 0xc
CryptoBufferExceeded ErrorCode = 0xd
KeyUpdateError ErrorCode = 0xe
AEADLimitReached ErrorCode = 0xf
)
func (e ErrorCode) isCryptoError() bool {
@@ -80,6 +81,8 @@ func (e ErrorCode) String() string {
return "CRYPTO_BUFFER_EXCEEDED"
case KeyUpdateError:
return "KEY_UPDATE_ERROR"
case AEADLimitReached:
return "AEAD_LIMIT_REACHED"
default:
if e.isCryptoError() {
return "CRYPTO_ERROR"