Sample code for 30+ languages & platforms
Zig

Example: SecureString.HashVal method

Demonstrates the HashVal method.

Chilkat Zig Downloads

Zig
const std = @import("std");
const chilkat = @import("chilkat");

pub fn main(init: std.process.Init) !void {
    const alloc = init.arena.allocator();

    const str = try chilkat.SecureString.init();
    defer str.deinit();
    str.setMaintainHash("sha256");
    str.append("Hello World") catch {};

    const encoded_hash = try str.hashVal(alloc, "base64");
    std.debug.print("{s}\n", .{encoded_hash});
}