# Presence
Lib and tool to generate short discrete presence tokens.
The token can be verified for validity in a certain time range, but otherwise appears random and is plausibly deniable. This should be good for privacy!
# Anatomy
The token shall be conveyed in a upper-hex string or in binary 8 bytes array.
The first 4 bytes is a sha256 hash of the salt upper-hex + the unix timestamp decimal string.
The other 4 bytes is the random salt.
# CLI
The companion CLI tool will verify or generate presence tokens.
Install:
```sh
$ cargo install presence
```
Usage:
```sh
# generate a new token
$ presence new
67CE238185EA6D0B
# or a few
$ presence new new new new
54C2BACC2E2DAF45
FBB0E058058CFF1E
71FE18E54F52DC76
22E8DAEBBDD7A220
```
```sh
# check a token
$ presence 1234567890123456
1234567890123456 None
$ presence nonsense
nonsense Failed: string must be 16 bytes long
$ presence nonsenseXXXXXXXX
nonsenseXXXXXXXX Failed: string must be a hex
```
```sh
# also works with stdin when no args are given
```
```sh
# and you can use stdin to also generate tokens with empty line
```