Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › crypto › tls › ApplicationCipherT Public Type Function ApplicationCipherT Doc Source Public Type Function std.crypto.tls.ApplicationCipherT
pub fn ApplicationCipherT (comptime AeadType : type , comptime HashType : type , comptime explicit_iv_length : comptime_int ) type Fields Structs Values File crypto/tls.zig: 487
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524 pub fn ApplicationCipherT (comptime AeadType : type , comptime HashType : type , comptime explicit_iv_length : comptime_int ) type {
return union {
pub const AEAD = AeadType ;
pub const Hash = HashType ;
pub const Hmac = crypto .auth .hmac .Hmac (Hash );
pub const Hkdf = crypto .kdf .hkdf .Hkdf (Hmac );
pub const enc_key_length = AEAD .key_length ;
pub const fixed_iv_length = AEAD .nonce_length - explicit_iv_length ;
pub const record_iv_length = explicit_iv_length ;
pub const mac_length = AEAD .tag_length ;
pub const mac_key_length = Hmac .key_length_min ;
pub const verify_data_length = 12 ;
tls_1_2 : Tls_1_2 ,
tls_1_3 : Tls_1_3 ,
pub const Tls_1_2 = extern struct {
client_write_MAC_key : [mac_key_length ]u8 ,
server_write_MAC_key : [mac_key_length ]u8 ,
client_write_key : [enc_key_length ]u8 ,
server_write_key : [enc_key_length ]u8 ,
client_write_IV : [fixed_iv_length ]u8 ,
server_write_IV : [fixed_iv_length ]u8 ,
// non-standard entropy
client_salt : [record_iv_length ]u8 ,
};
pub const Tls_1_3 = struct {
client_secret : [Hash .digest_length ]u8 ,
server_secret : [Hash .digest_length ]u8 ,
client_key : [AEAD .key_length ]u8 ,
server_key : [AEAD .key_length ]u8 ,
client_iv : [AEAD .nonce_length ]u8 ,
server_iv : [AEAD .nonce_length ]u8 ,
};
};
}