File: README.md

package info (click to toggle)
crypto-random-clojure 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 108 kB
  • sloc: makefile: 20; sh: 2
file content (39 lines) | stat: -rw-r--r-- 861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# crypto-random

A small Clojure library for generating cryptographically secure random
bytes and strings.

## Installation

Add the following dependency to your `project.clj` file:

    [crypto-random "1.2.1"]

## Functions

### `(crypto.random/bytes size)`

Returns a random byte array of the specified size.

### `(crypto.random/base64 size)`

Return a random base64 string of the specified size in bytes.

### `(crypto.random/base32 size)`

Return a random base32 string of the specified size in bytes.

### `(crypto.random/hex size)`

Return a random hex string of the specified size in bytes.

### `(crypto.random/url-part size)`

Return a random string suitable for being inserted into URLs. The size
denotes the number of bytes to generate.

## License

Copyright © 2020 James Reeves

Distributed under the Eclipse Public License, the same as Clojure.