From 8828c3c700330b170046ebc997999a472eac09b4 Mon Sep 17 00:00:00 2001 From: Charles Lee Date: Fri, 15 Mar 2024 02:24:39 -0700 Subject: [PATCH] Remove key material from error messages. PiperOrigin-RevId: 616060223 Change-Id: I7a67f771e8e08d6bddfc78380ceed195b9510910 --- daead/subtle/aes_siv.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daead/subtle/aes_siv.go b/daead/subtle/aes_siv.go index 92b1650..87878d5 100644 --- a/daead/subtle/aes_siv.go +++ b/daead/subtle/aes_siv.go @@ -77,7 +77,7 @@ func NewAESSIV(key []byte) (*AESSIV, error) { k2 := key[32:] c, err := aes.NewCipher(k1) if err != nil { - return nil, fmt.Errorf("aes_siv: aes.NewCipher(%s) failed, %v", k1, err) + return nil, fmt.Errorf("aes_siv: aes.NewCipher() failed: %v", err) } block := make([]byte, aes.BlockSize) @@ -161,7 +161,7 @@ func (asc *AESSIV) ctrCrypt(siv, in, out []byte) error { c, err := aes.NewCipher(asc.K2) if err != nil { - return fmt.Errorf("aes_siv: aes.NewCipher(%s) failed, %v", asc.K2, err) + return fmt.Errorf("aes_siv: aes.NewCipher() failed: %v", err) } steam := cipher.NewCTR(c, iv)