Welcome to little lamb

Code » ssp » release » tree

[release] / src / doc / ssp-add.1.md

% ssp
% ssp-add(1)
% ssp 0.1.0
% 2024-01-09

# NAME

ssp-add - add an entry

# SYNOPSIS

*ssp* add [OPTION..] `ENTRY` `SECRET`

# DESCRIPTION

The *add* command allows to add a new entry to an existing database, or to
create a new database.

`ENTRY` must be the entry's name, that will be used to identify the
newly-created entry.

`SECRET` must be the entry's secret, encoded in base32.

Unless *--time* is used, the new entry will be set to be counter-based. Unless
set with *--algo*, the hashing algorithm is SHA1.

<inc show-entry.md>

# OPTIONS

: *-a*, *--algo* `ALGO`
:: Set `ALGO` as hashing algorithm; Defaults to sha1. Use `list` to list
:: available algorithms.

: *-C*, *--comments* `COMMENTS`
:: Set `COMMENTS` as the entry's comments.

: *-c*, *--counter* `NUM`
:: Set entry to be counter-based (HOTP) with the next counter value to be `NUM`
:: Defaults to 1.

: *-d*, *--digits* `NUM`
:: Set to return an OTP of `NUM` digits. Valid values are from 5 to 9 (both
:: included); Defaults to 6.

: *-t*, *--time*[=`SECS`]
:: Set entry to be time-based (TOTP) with a precision of `SECS` seconds. Valid
:: values are from 10 to 59 (both included); Default to 30.

# EXAMPLES

To create a new entry named "test" using the ASCII string "12345678901234567890"
as actual secret :

    $ ssp add test GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ


To create a new time-based entry named "foobar" with a 1 minute (60s) precision,
using SHA256 as hashing algorithm and SECRET= as (base32-encoded) secret :

    $ ssp a --algo sha256 -t60 foobar SECRET=


# SEE ALSO

[ssp-edit](1), [ssp-remove](1)