commit d05682a2466fd3fef0fa13d483dcf62e034acd91
parent 296925c91d79362d6b8ac94e0336a38e9af0f1c9
Author: Armin Preiml <apreiml@strohwolke.at>
Date: Mon, 8 Aug 2022 15:49:09 +0200
crypto::math: minor doc improvement
Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/math/bits.ha b/crypto/math/bits.ha
@@ -49,7 +49,8 @@ export fn rotr64(x: u64, k: int) u64 = rotl64(x, -k);
};
-// Stores the xor of a and b into dest.
+// Stores the xor of 'a' and 'b' into 'dest'. All parameters must have the same
+// length. 'dest' may be the same slice as 'a' and/or 'b'.
export fn xor(dest: []u8, a: []u8, b: []u8) void = {
assert(len(dest) == len(a) && len(dest) == len(b),
"dest, a and b must have the same length");