fn BinValue(comptime max_len: usize) type

A wrapped binary value whose maximum size is max_len.

This type must be used whenever a binary value is encoded in a PHC-formatted string. This includes salt, hash, and any other binary parameters such as keys.

Once initialized, the actual value can be read with the constSlice() function.

Parameters

max_len: usize,

Fields

buf: [max_len]u8 = undefined,
len: usize = 0,

Functions

fn constSlice(self: *const Self) []const u8

Return the slice containing the actual value.

fn fromSlice(slice: []const u8) Error!Self

Wrap an existing byte slice