[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 53a69bdd12e966d97d84f2d66812ec4452f8e191
parent a8b5f993854cf9767ad308dabe025aadf0292820
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon,  8 May 2023 20:47:08 -0400

crypto/conventions.txt: recommend bytes::zero

Assigning to [0...] isn't guaranteed to have a side effect (even if
currently it always does), whereas a call to bytes::zero is guaranteed
to always zero the array/slice.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Mcrypto/conventions.txt | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/crypto/conventions.txt b/crypto/conventions.txt @@ -13,5 +13,4 @@ when it is no longer required. A few items to note about Hare: - Return-by-value will leave garbage on the stack which is copied into the caller's stack frame and abandoned. You cannot return-by-value any objects which contain secret information. -- Assignments are never optimized away. You can securely erase an array's - contents with array = [0...]; +- To securely erase an array's contents, use bytes::zero.