Created
June 30, 2023 15:12
-
-
Save jedisct1/c598ae296b59bdbe29be93241aa6faab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const HmacSha256 = std.crypto.auth.hmac.sha2.HmacSha256; | |
pub fn main() !void { | |
var out: [HmacSha256.mac_length]u8 = undefined; | |
HmacSha256.create(&out, "The quick brown fox jumps over the lazy dog", "key"); | |
std.debug.print("{s}\n", .{std.fmt.bytesToHex(&out, .lower)}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment