std.compress.xz.Decompress.Error
- Kind
- error set
- Module
std.compress.xz.Decompress
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of the 224 modules of the Zig reference that have fewer than 20 entries each, in the order of the module names. This page has 1,638 cards.
std.compress.xz.DecompressSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(input: *Reader, gpa: Allocator, buffer: []u8) !Decompress
XZ uses a series of LZMA2 blocks which each specify a dictionary size anywhere from 4K to 4G. Thus, this API dynamically allocates the dictionary as-needed.
std.compress.xz.DecompressSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.compress.xz.DecompressSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.compress.xz.DecompressSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn takeBuffer(d: *Decompress) []u8
Reclaim ownership of the buffer passed to `init`.
std.compress.xz.DecompressSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
AES-128-CCM* with no authentication (encryption-only, 13-byte nonce).
std.crypto.aead.aes_ccmSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
AES-128-CCM with 8-byte authentication tag and 13-byte nonce.
std.crypto.aead.aes_ccmSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
AES-128-CCM with 16-byte authentication tag and 13-byte nonce.
std.crypto.aead.aes_ccmSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
AES-256-CCM* with no authentication (encryption-only, 13-byte nonce).
std.crypto.aead.aes_ccmSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
AES-256-CCM with 8-byte authentication tag and 13-byte nonce.
std.crypto.aead.aes_ccmSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
AES-256-CCM with 16-byte authentication tag and 13-byte nonce.
std.crypto.aead.aes_ccmSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.ascon.AsconAead128Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decrypt(m: []u8, c: []const u8, tag: [tag_length]u8, ad: []const u8, npub: [nonce_length]u8, k: [key_length]u8) AuthenticationError!void
Decrypt a message with Ascon-AEAD128.
std.crypto.aead.ascon.AsconAead128Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, k: [key_length]u8) void
Encrypt a message with Ascon-AEAD128.
std.crypto.aead.ascon.AsconAead128Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.ascon.AsconAead128Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.ascon.AsconAead128Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.ascon.AsconAead128Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.isapSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decrypt(m: []u8, c: []const u8, tag: [tag_length]u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) AuthenticationError!void
`m`: Message `c`: Ciphertext `tag`: Authentication tag `ad`: Associated data `npub`: Public nonce `k`: Private key Asserts `c.len == m.len`.
std.crypto.aead.isapSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) void
std.crypto.aead.isapSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.isapSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.isapSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.aead.isapSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decrypt(m: []u8, c: []const u8, tag: [tag_length]u8, ad: []const u8, npub: [nonce_length]u8, k: [key_length]u8) AuthenticationError!void
`m`: Message `c`: Ciphertext `tag`: Authentication tag `ad`: Associated data (see below) `npub`: Public nonce `k`: Private key Asserts `c.len == m.len`.
std.crypto.aead.salsa_poly.XSalsa20Poly1305Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, k: [key_length]u8) void
std.crypto.aead.salsa_poly.XSalsa20Poly1305Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Key length in bytes.
std.crypto.aead.salsa_poly.XSalsa20Poly1305Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Nonce length in bytes.
std.crypto.aead.salsa_poly.XSalsa20Poly1305Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Authentication tag length in bytes.
std.crypto.aead.salsa_poly.XSalsa20Poly1305Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn CbcMac(comptime BlockCipher: type) type
FIPS 113 (1985): Computer Data Authentication https://csrc.nist.gov/publications/detail/fips/113/archive/1985-05-30 WARNING: CBC-MAC is insecure for variable-length messages without additional protection.
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn create(out: *[mac_length]u8, msg: []const u8, key: *const [key_length]u8) void
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn final(self: *Self, out: *[mac_length]u8) void
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn finalResult(d: *Self) [mac_length]u8
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(key: *const [key_length]u8) Self
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn update(self: *Self, msg: []const u8) void
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
CBC-MAC with AES-128 - FIPS 113 https://csrc.nist.gov/publications/detail/fips/113/archive/1985-05-30.
std.crypto.auth.cbc_macSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Cmac(comptime BlockCipher: type) type
NIST Special Publication 800-38B - The CMAC Mode for Authentication https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38b.pdf.
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn create(out: *[mac_length]u8, msg: []const u8, key: *const [key_length]u8) void
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn final(self: *Self, out: *[mac_length]u8) void
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn finalResult(d: *Self) [mac_length]u8
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(key: *const [key_length]u8) Self
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn update(self: *Self, msg: []const u8) void
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
CMAC with AES-128 - RFC 4493 https://www.rfc-editor.org/rfc/rfc4493.
std.crypto.auth.cmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Hmac(comptime Hash: type) type
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn create(out: *[mac_length]u8, msg: []const u8, key: []const u8) void
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn final(ctx: *Self, out: *[mac_length]u8) void
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn finalResult(d: *Self) [mac_length]u8
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(key: []const u8) Self
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn update(ctx: *Self, msg: []const u8) void
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.auth.hmacSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn SipHash64(comptime c_rounds: usize, comptime d_rounds: usize) type
SipHash function with 64-bit output.
std.crypto.auth.siphashSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn SipHash128(comptime c_rounds: usize, comptime d_rounds: usize) type
SipHash function with 128-bit output.
std.crypto.auth.siphashSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addCertsFromDir(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp, iterable_dir: Io.Dir) AddCertsFromDirError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addCertsFromDirPath(cb: *Bundle, gpa: Allocator, io: Io, dir: Io.Dir, sub_dir_path: []const u8) AddCertsFromDirPathError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addCertsFromDirPathAbsolute(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp, abs_dir_path: []const u8) AddCertsFromDirPathError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addCertsFromFile(cb: *Bundle, gpa: Allocator, file_reader: *Io.File.Reader, now_sec: i64) AddCertsFromFileError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addCertsFromFilePath(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp, dir: Io.Dir, sub_file_path: []const u8) AddCertsFromFilePathError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addCertsFromFilePathAbsolute(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp, abs_file_path: []const u8) AddCertsFromFilePathError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(cb: *Bundle, gpa: Allocator) void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn find(cb: Bundle, subject_name: []const u8) ?u32
The returned bytes become invalid after calling any of the rescan functions or add functions.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parseCert(cb: *Bundle, gpa: Allocator, decoded_start: u32, now_sec: i64) ParseCertError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rescan(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp) RescanError!void
Clears the set of certificates and then scans the host operating system file system standard locations for certificates.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verify(cb: Bundle, subject: Certificate.Parsed, now_sec: i64) VerifyError!void
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.Certificate.BundleSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.codecsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
(best-effort) constant time base64 encoding and decoding.
std.crypto.codecsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
(best-effort) constant time hexadecimal encoding and decoding.
std.crypto.codecsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decode(comptime T: type, encoded: []const u8) !T
std.crypto.codecs.asn1.derSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.codecs.asn1.derSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encode(allocator: std.mem.Allocator, value: anytype) ![]u8
Caller owns returned memory.
std.crypto.codecs.asn1.derSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.codecs.asn1.derSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn any(self: *Decoder, comptime T: type) !T
Expect a value.
std.crypto.codecs.asn1.der.DecoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn element(self: *Decoder, expected: ExpectedTag) (error{ EndOfStream, UnexpectedElement } || Element.DecodeError)!Element
/ Expect an element.
std.crypto.codecs.asn1.der.DecoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sequence(self: *Decoder) !Element
/ Expect a sequence.
std.crypto.codecs.asn1.der.DecoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn view(self: Decoder, elem: Element) []const u8
View of element bytes.
std.crypto.codecs.asn1.der.DecoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn any(self: *Encoder, val: anytype) !void
Encode any value.
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(self: *Encoder) void
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(allocator: std.mem.Allocator) Encoder
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn length(self: *Encoder, len: usize) !void
Encode a length.
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn prependBytes(self: *Encoder, bytes: []const u8) !void
Write raw bytes.
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tag(self: *Encoder, tag_: Tag) !void
Encode a tag.
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tagBytes(self: *Encoder, tag_: Tag, bytes: []const u8) !void
Encode a tag and length-prefixed bytes.
std.crypto.codecs.asn1.der.EncoderSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decodeDer(decoder: *der.Decoder) !Oid
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encodeDer(self: Oid, encoder: *der.Encoder) !void
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromDot(dot_notation: []const u8, out: []u8) InitError!Oid
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromDotComptime(comptime dot_notation: []const u8) Oid
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn StaticMap(comptime Enum: type) type
Maps of: - Oid -> enum - Enum -> oid.
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn initComptime(comptime key_pairs: anytype) ReturnType
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toDot(self: Oid, writer: *std.Io.Writer) std.Io.Writer.Error!void
std.crypto.codecs.asn1.OidSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decode(bin: []u8, encoded: []const u8, comptime variant: Variant) error
Decodes a base64 string into a binary buffer.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decodedLen(b64_len: usize, variant: Variant) !usize
Returns the maximum possible decoded size for a given input length - The actual length may be less if the input includes padding. `InvalidPadding` is returned if the input length is not valid.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
/ A decoder that ignores certain characters.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decoderWithIgnore(ignore_chars: []const u8) error
Creates a new decoder that ignores certain characters.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decode(self: DecoderWithIgnore, bin: []u8, encoded: []const u8, comptime variant: Variant) error
Decodes a base64 string into a binary buffer.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decodedLenForSlice(decoder: DecoderWithIgnore, encoded: []const u8, variant: Variant) !usize
Returns the decoded length of a base64 string, ignoring any characters in the ignore list.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decodedLenUpperBound(b64_len: usize) usize
Returns the maximum possible decoded size for a given input length after skipping ignored characters.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encode(encoded: []u8, bin: []const u8, comptime variant: Variant) error
Encodes a binary buffer into a base64 string.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encodedLen(bin_len: usize, variant: Variant) usize
Returns the length of the encoded base64 string for a given length.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The base64 variant to use.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The standard base64 variant.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The standard base64 variant without padding.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The URL-safe base64 variant.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The URL-safe base64 variant without padding.
std.crypto.codecs.base64Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decode(bin: []u8, encoded: []const u8) error
Decodes a hexadecimal string into a binary buffer.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A decoder that ignores certain characters.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decoderWithIgnore(ignore_chars: []const u8) error
Creates a new decoder that ignores certain characters.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decode(self: DecoderWithIgnore, bin: []u8, encoded: []const u8) error
Decodes a hexadecimal string into a binary buffer.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decodedLenForSlice(decoder: DecoderWithIgnore, encoded: []const u8) !usize
Returns the decoded length of a hexadecimal string, ignoring any characters in the ignore list.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn decodedLenUpperBound(hex_len: usize) usize
Returns the maximum possible decoded size for a given input length after skipping ignored characters.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn encode(encoded: []u8, bin: []const u8, comptime case: std.fmt.Case) error
Encodes a binary buffer into a hexadecimal string.
std.crypto.codecs.hexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
`true` if AES is backed by hardware (AES-NI on x86_64, ARM Crypto Extensions on AArch64).
std.crypto.core.aesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addByte(self: *Self, byte: u8, offset: usize) void
XOR a byte into the state at a given offset.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addBytes(self: *Self, bytes: []const u8) void
XOR bytes into the beginning of the state.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn asBytes(self: *Self) *[block_bytes]u8
A representation of the state as bytes.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Number of bytes in the state.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn clear(self: *Self, from: usize, to: usize) void
Set the words storing the bytes of a given range to zero.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn endianSwap(self: *Self) void
Byte-swap the entire state if the architecture doesn't match the required endianness.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn extractBytes(self: *Self, out: []u8) void
Extract the first bytes of the state.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(initial_state: [block_bytes]u8) Self
Initialize the state from a slice of bytes.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn initFromWords(initial_state: [5]u64) Self
Initialize the state from u64 words in native endianness.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn initXof() Self
Initialize the state for Ascon XOF. Returns: A new State initialized with the Ascon XOF initialization vector.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn initXofA() Self
Initialize the state for Ascon XOFa.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn permute(state: *Self) void
Apply a full-round permutation to the state.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn permuteR(state: *Self, comptime rounds: u4) void
Apply a reduced-round permutation to the state.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn permuteRatchet(state: *Self, comptime rounds: u4, comptime rate: u6) void
Apply a permutation to the state and prevent backtracking.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn secureZero(self: *Self) void
Clear the entire state, disabling compiler optimizations.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn setBytes(self: *Self, bytes: []const u8) void
Set bytes starting at the beginning of the state.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn xorBytes(self: *Self, out: []u8, in: []const u8) void
XOR the first bytes of the state into a slice of bytes.
std.crypto.core.AsconSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ctr(comptime BlockCipher: anytype, block_cipher: BlockCipher, dst: []u8, src: []const u8, iv: [BlockCipher.block_length]u8, endian: std.builtin.Endian) void
Counter mode.
std.crypto.core.modesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ctrSlice(comptime BlockCipher: anytype, block_cipher: BlockCipher, dst: []u8, src: []const u8, iv: [BlockCipher.block_length]u8, endian: std.builtin.Endian, comptime counter_offset: usize, comptime counter_size: usize) void
Counter mode with configurable counter position and size.
std.crypto.core.modesSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
An X25519 key pair.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromEd25519(ed25519_key_pair: crypto.sign.Ed25519.KeyPair) (IdentityElementError || EncodingError)!KeyPair
Create a key pair from an Ed25519 key pair.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn generate(io: std.Io) KeyPair
Generate a new, random key pair.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn generateDeterministic(seed: [seed_length]u8) KeyPair
Deterministically derive a key pair from a cryptograpically secure secret seed.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a public key.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn publicKeyFromEd25519(ed25519_public_key: crypto.sign.Ed25519.PublicKey) (IdentityElementError || EncodingError)![public_length]u8
Compute the X25519 equivalent to an Ed25519 public eky.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn recoverPublicKey(secret_key: [secret_length]u8) [public_length]u8
Compute the public key for a given private key.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn scalarmult(secret_key: [secret_length]u8, public_key: [public_length]u8) IdentityElementError![shared_length]u8
Compute the scalar product of a public key and a secret scalar.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a secret key.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Seed (for key pair creation) length in bytes.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of the output of the DH function.
std.crypto.dh.X25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The Curve25519 base point.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn clampedMul(p: Curve25519, s: [32]u8) IdentityElementError!Curve25519
Multiply a Curve25519 point by a scalar after "clamping" it.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn clearCofactor(p: Curve25519) WeakPublicKeyError!Curve25519
Multiply a point by the cofactor, returning WeakPublicKey if the element is in a small-order group.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn elligator2(r: Fe) Curve25519
Elligator2 map for Curve25519.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes(s: [32]u8) Curve25519
Decode a Curve25519 point from its compressed (X) coordinates.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromEdwards25519(p: crypto.ecc.Edwards25519) IdentityElementError!Curve25519
Compute the Curve25519 equivalent to an Edwards25519 point.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mul(p: Curve25519, s: [32]u8) (IdentityElementError || WeakPublicKeyError)!Curve25519
Multiply a Curve25519 point by a scalar without clamping it.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rejectIdentity(p: Curve25519) IdentityElementError!void
Reject the neutral element.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rejectNonCanonical(s: [32]u8) NonCanonicalError!void
Check that the encoding of a Curve25519 point is canonical.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Field arithmetic mod the order of the main subgroup.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toBytes(p: Curve25519) [32]u8
Encode a Curve25519 point.
std.crypto.ecc.Curve25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn add(p: Ristretto255, q: Ristretto255) Ristretto255
Add two Ristretto255 elements.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The base point (Ristretto is a curve in desguise).
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn dbl(p: Ristretto255) Ristretto255
Double a Ristretto255 element.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length in byte of an encoded element.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn equivalent(p: Ristretto255, q: Ristretto255) bool
Return true if two Ristretto255 elements are equivalent.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The underlying prime field.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes(s: [encoded_length]u8) (NonCanonicalError || EncodingError)!Ristretto255
Decode a Ristretto255 representative.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromUniform(h: [64]u8) Ristretto255
Map a 64-bit string into a Ristretto255 group element.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mul(p: Ristretto255, s: [encoded_length]u8) (IdentityElementError || WeakPublicKeyError)!Ristretto255
Multiply a Ristretto255 element with a scalar.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rejectIdentity(p: Ristretto255) IdentityElementError!void
Reject the neutral element.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Field arithmetic mod the order of the main subgroup.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sub(p: Ristretto255, q: Ristretto255) Ristretto255
Subtract two Ristretto255 elements.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toBytes(e: Ristretto255) [encoded_length]u8
Encode to a Ristretto255 representative.
std.crypto.ecc.Ristretto255Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
MAC verification failed - The tag doesn't verify for the given ciphertext and secret key.
std.crypto.errorsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Context string is too long.
std.crypto.errorsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Encoded input cannot be decoded.
std.crypto.errorsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Any error related to cryptography operations.
std.crypto.errorsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Finite field operation returned the identity element.
std.crypto.errorsSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.