DoxigAlpha

logSecrets

Function parameters

Parameters

#
w:*Writer
context:anytype
secrets:anytype

Type definitions in this namespace

Types

#

Initiates a TLS handshake and establishes a TLSv1.2 or TLSv1.3 session.

Functions

#
init
Initiates a TLS handshake and establishes a TLSv1.2 or TLSv1.3 session.
end
Sends a `close_notify` alert, which is necessary for the server to

Error sets in this namespace

Error Sets

#

The `Reader` supplied to `init` requires a buffer capacity

Values

#
min_buffer_len
The `Reader` supplied to `init` requires a buffer capacity

Source

Implementation

#
fn logSecrets(w: *Writer, context: anytype, secrets: anytype) void {
    inline for (@typeInfo(@TypeOf(secrets)).@"struct".fields) |field| w.print("{s}" ++
        (if (@hasField(@TypeOf(context), "counter")) "_{d}" else "") ++ " {x} {x}\n", .{field.name} ++
        (if (@hasField(@TypeOf(context), "counter")) .{context.counter} else .{}) ++ .{
        context.client_random,
        @field(secrets, field.name),
    }) catch {};
}