2024-12-21 13:17:09 +00:00
#import "@preview/tidy:0.4.0"
#import "src/lib.typ"
2024-12-23 13:25:13 +00:00
#import "gallery/readme_banner.typ" as banner
2024-12-23 15:53:30 +00:00
#set document(
title: "Jumble v" + str(lib.version) + " manual",
author: "LordBaryhobal"
)
2024-12-23 13:25:13 +00:00
#set text(font: "Source Sans 3")
#set page(
header: [
jumble #sym.dash.em v#lib.version
],
footer: context {
if counter(page).get().first() != 1 {
align(center, counter(page).display("1 / 1", both: true))
}
}
)
2024-12-23 17:03:54 +00:00
#set heading(numbering: (..num) => if num.pos().len() < 4 {
numbering("1.1", ..num)
})
#let code-block(code) = {
let txt = code.text
txt = txt.replace("$version", str(lib.version))
return box(
raw(
txt,
lang: code.lang,
block: true
),
fill: luma(95%),
inset: 1em,
radius: 0.5em,
stroke: luma(80%) + 0.5pt
)
}
2024-12-23 13:25:13 +00:00
#align(center)[
#v(1cm)
#text(size: 2em)[
*#banner.txt*
]
#text(size: 1.5em)[
#banner.colorize-hex(banner.cipher)
]
#v(0.5cm)
_by LordBaryhobal_
#v(3cm)
#text(
size: 1.8em
)[
*Manual*
]
]
#v(1fr)
#box(
width: 100%,
stroke: black,
inset: 1em,
outline(
indent: 1em,
2024-12-23 17:03:54 +00:00
depth: 2
2024-12-23 13:25:13 +00:00
)
)
2024-12-23 17:03:54 +00:00
#pagebreak(weak: true)
= Introduction
This package provides several common hashing algorithms and other related functions. All functions are directly available in the package's namespace (i.e. no need to import sub-modules).
To use it, you can simply import the package as a whole:\
#pad(left: 1em, code-block(```typ
#import "@preview/jumble:$version"
...
#jumble.md5(msg)
```))
or import specific functions (or all):\
#pad(left: 1em, code-block(```typ
#import "@preview/jumble:$version": md5
...
#md5(msg)
```))
2024-12-23 13:25:13 +00:00
#pagebreak(weak: true)
2024-12-23 17:03:54 +00:00
= Reference
2024-12-21 13:17:09 +00:00
#let mod = tidy.parse-module.with(
scope: (jumble: lib),
preamble: "#import jumble: *;"
)
#let sha-doc = mod(
read("src/sha.typ"),
2024-12-23 17:03:54 +00:00
name: "SHA"
2024-12-21 13:17:09 +00:00
)
#tidy.show-module(sha-doc)
2024-12-22 00:10:33 +00:00
#pagebreak(weak: true)
2024-12-21 22:41:44 +00:00
#let md-doc = mod(
read("src/md.typ"),
2024-12-23 17:03:54 +00:00
name: "MD"
2024-12-21 22:41:44 +00:00
)
#tidy.show-module(md-doc)
2024-12-22 00:10:33 +00:00
#pagebreak(weak: true)
2024-12-21 13:17:09 +00:00
#let misc-doc = mod(
read("src/misc.typ"),
name: "misc"
)
#tidy.show-module(misc-doc)
2024-12-22 00:10:33 +00:00
#pagebreak(weak: true)
2024-12-21 13:17:09 +00:00
#let base-doc = mod(
read("src/base.typ"),
name: "base"
)
#tidy.show-module(base-doc)
2024-12-22 00:10:33 +00:00
#pagebreak(weak: true)
2024-12-21 13:17:09 +00:00
#let utils-doc = mod(
read("src/utils.typ"),
name: "utils"
)
#tidy.show-module(utils-doc)