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 › Certificate › NamedCurve Public Enum NamedCurve Doc Source Public Enum std.crypto.Certificate.NamedCurve
pub const NamedCurve = enum Types Values File crypto/Certificate.zig: 98
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116 pub const NamedCurve = enum {
secp384r1 ,
secp521r1 ,
X9_62_prime256v1 ,
pub const map = std .StaticStringMap (NamedCurve ).initComptime (.{
.{ &.{ 0x2B , 0x81 , 0x04 , 0x00 , 0x22 }, .secp384r1 },
.{ &.{ 0x2B , 0x81 , 0x04 , 0x00 , 0x23 }, .secp521r1 },
.{ &.{ 0x2A , 0x86 , 0x48 , 0xCE , 0x3D , 0x03 , 0x01 , 0x07 }, .X9_62_prime256v1 },
});
pub fn Curve (comptime curve : NamedCurve ) type {
return switch (curve ) {
.X9_62_prime256v1 => crypto .ecc .P256 ,
.secp384r1 => crypto .ecc .P384 ,
.secp521r1 => @compileError ("unimplemented" ),
};
}
}