Liking cljdoc? Tell your friends :D

tupelo.cuid


cuid->idxclj

(cuid->idx ctx cuid)

Inputs: [ctx :- tsk/KeyMap cuid :- s/Int] Returns: BigInteger

Given a context map and a CUID value (Cryptographic Unique ID) in [0..2^N), returns the corresponding index value, also in [0..2^N).

Inputs: [ctx :- tsk/KeyMap cuid :- s/Int]
Returns: BigInteger

Given a context map and a CUID value (Cryptographic Unique ID) in [0..2^N),
 returns the corresponding index value, also in [0..2^N).
raw docstring

idx->cuidclj

(idx->cuid ctx ival)

Inputs: [ctx :- tsk/KeyMap ival :- s/Int] Returns: BigInteger

Given a context map and an index value [0..2^N), returns the corresponding CUID value (Cryptographic Unique ID), also in [0..2^N). CUID values are guaranteed to be unique for each index and pseudo-random within the interval [0..2^N).

Inputs: [ctx :- tsk/KeyMap ival :- s/Int]
Returns: BigInteger

Given a context map and an index value [0..2^N), returns the corresponding
CUID value (Cryptographic Unique ID), also in [0..2^N). CUID values are guaranteed
to be unique for each index and pseudo-random within the interval [0..2^N).
raw docstring

new-ctxclj

(new-ctx opts)

Inputs: [opts :- tsk/KeyMap] Returns: tsk/KeyMap

Creates a new Cryptographic Unique ID (CUID) context map. Usage:

  (new-ctx <params-map>)

where <params-map> is of the form:

  {:num-bits     <long>  ; REQUIRED:  (minimum: 4): input/output integers in [0..2^n)
   :rand-seed    <long>  ; optional:  PRNG seed (default: randomized)
   :num-rounds   <long>  ; optional:  positive int (default: 7)
  } 
Inputs: [opts :- tsk/KeyMap]
Returns: tsk/KeyMap

Creates a new Cryptographic Unique ID (CUID) context map. Usage:

      (new-ctx <params-map>)

where <params-map> is of the form:

      {:num-bits     <long>  ; REQUIRED:  (minimum: 4): input/output integers in [0..2^n)
       :rand-seed    <long>  ; optional:  PRNG seed (default: randomized)
       :num-rounds   <long>  ; optional:  positive int (default: 7)
      } 
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close