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 › HandshakeCipherT Public Type Function HandshakeCipherT Doc Source Public Type Function std.crypto.tls.HandshakeCipherT
pub fn HandshakeCipherT (comptime AeadType : type , comptime HashType : type , comptime explicit_iv_length : comptime_int ) type Fields transcript_hash : A .Hash version : union { tls_1_2 : struct { expected_server_verify_data : [A .verify_data_length ]u8 , app_cipher : A .Tls_1_2 , }, tls_1_3 : struct { handshake_secret : [A .Hkdf .prk_length ]u8 , master_secret : [A .Hkdf .prk_length ]u8 , client_handshake_key : [A .AEAD .key_length ]u8 , server_handshake_key : [A .AEAD .key_length ]u8 , client_finished_key : [A .Hmac .key_length ]u8 , server_finished_key : [A .Hmac .key_length ]u8 , client_handshake_iv : [A .AEAD .nonce_length ]u8 , server_handshake_iv : [A .AEAD .nonce_length ]u8 , }, } Values File crypto/tls.zig: 455
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477 pub fn HandshakeCipherT (comptime AeadType : type , comptime HashType : type , comptime explicit_iv_length : comptime_int ) type {
return struct {
pub const A = ApplicationCipherT (AeadType , HashType , explicit_iv_length );
transcript_hash : A .Hash ,
version : union {
tls_1_2 : struct {
expected_server_verify_data : [A .verify_data_length ]u8 ,
app_cipher : A .Tls_1_2 ,
},
tls_1_3 : struct {
handshake_secret : [A .Hkdf .prk_length ]u8 ,
master_secret : [A .Hkdf .prk_length ]u8 ,
client_handshake_key : [A .AEAD .key_length ]u8 ,
server_handshake_key : [A .AEAD .key_length ]u8 ,
client_finished_key : [A .Hmac .key_length ]u8 ,
server_finished_key : [A .Hmac .key_length ]u8 ,
client_handshake_iv : [A .AEAD .nonce_length ]u8 ,
server_handshake_iv : [A .AEAD .nonce_length ]u8 ,
},
},
};
}