quicp2p/quicly/cid.nim

23 lines
935 B
Nim
Raw Normal View History

2020-11-02 00:52:13 +01:00
type
quicly_cid_t* {.importc, header: "quicly/cid.h", bycopy.} = object
2020-11-02 00:52:13 +01:00
cid*: array[20, uint8]
len*: uint8
quicly_cid_plaintext_t* {.importc, header: "quicly/cid.h", bycopy.} = object
2020-11-02 00:52:13 +01:00
master_id*: uint32
path_id* {.bitsize: 8.}: uint32
thread_id* {.bitsize: 24.}: uint32
node_id*: uint64
quicly_cid_encryptor_t* {.importc, header: "quicly/cid.h", bycopy.} = object
2020-11-02 00:52:13 +01:00
encrypt_cid*: proc (self: ptr quicly_cid_encryptor_t;
encrypted: ptr quicly_cid_t; stateless_reset_token: pointer;
plaintext: ptr quicly_cid_plaintext_t) {.cdecl.}
decrypt_cid*: proc (self: ptr quicly_cid_encryptor_t;
plaintext: ptr quicly_cid_plaintext_t; encrypted: pointer;
len: csize_t): csize_t {.cdecl.}
generate_stateless_reset_token*: proc (self: ptr quicly_cid_encryptor_t;
token: pointer; cid: pointer): cint {.cdecl.}