Files
herolib/aiprompts/v_core/crypto/hmac.md
2025-09-02 07:28:13 +02:00

625 B

module hmac

Contents

equal

fn equal(mac1 []u8, mac2 []u8) bool

equal compares 2 MACs for equality, without leaking timing info.

Note: if the lengths of the 2 MACs are different, probably a completely different hash function was used to generate them => no useful timing information.

[Return to contents]

new

fn new(key []u8, data []u8, hash_func fn ([]u8) []u8, blocksize int) []u8

new returns a HMAC byte array, depending on the hash algorithm used.

[Return to contents]

Powered by vdoc. Generated on: 2 Sep 2025 07:18:17