Liking cljdoc? Tell your friends :D

roughtime-protocol.request


make-requestclj

(make-request opts)

Build a RoughTime request which may be sent to a server.

Depending on the version, this is either a full Roughtime packet (with ROUGHTIM header), or a bare RoughTime message.

Accepts the options

  • ver: nil or Seq[Integer] Version numbers of the protocol. nil for Google protocol. Defaults to config/fiducial-version.

  • nonce: byte[] nonce for the request; 32 bytes for IETF; 64 bytes for Google Defaults to util/gen-nonce of the required size.

  • msg-size: integer Size (in bytes) to pad the request MESSAGE. Note that the PACKET is 12 bytes longer than the message. The spec is somewhat ambiguous about whether the limit applies to the MESSAGE or to the PACKET; different implementations appear to make different choices. Defaults to 1024.

  • public-key: byte[] Long-term public key for the server. If specified, and if the protocol version allows, we add a SRV tag to the request corresponding to this key.

Returns request packet as a byte[].

Build a RoughTime request which may be sent to a server.

Depending on the version, this is either a full Roughtime **packet**
(with ROUGHTIM header), or a bare RoughTime **message**.

Accepts the options

  * ver: nil or Seq[Integer]
      Version numbers of the protocol.  nil for Google protocol.
      Defaults to `config/fiducial-version`.

  * nonce: byte[]
      nonce for the request; 32 bytes for IETF; 64 bytes for Google
      Defaults to `util/gen-nonce` of the required size.

  * msg-size: integer
      Size (in bytes) to pad the request MESSAGE.  Note that the PACKET is
      12 bytes longer than the message.  The spec is somewhat ambiguous about
      whether the limit applies to the MESSAGE or to the PACKET; different
      implementations appear to make different choices.
      Defaults to 1024.

  * public-key: byte[]
      Long-term public key for the server.  If specified, and if the protocol
      version allows, we add a SRV tag to the request corresponding to this
      key.

Returns request packet as a byte[].
sourceraw docstring

make-request-msgclj

(make-request-msg {:keys [ver nonce public-key msg-size]
                   :or {ver [fiducial-version] msg-size 1024}})

Constructs a valid TLV request. Uses protocol-appropriate nonce lengths and padding tags.

Constructs a valid TLV request.
Uses protocol-appropriate nonce lengths and padding tags.
sourceraw docstring

parse-requestclj

(parse-request request-bytes
               &
               [{:keys [min-size-bytes] :or {min-size-bytes 1024}}])

Parse and validate a Roughtime request, handling Google and IETF draft variants.

Parse and validate a Roughtime request, handling Google and IETF draft variants.
sourceraw docstring

REQUEST-TYPEclj

TYPE value for requests.

TYPE value for requests.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close