module

RNS::Rnid

Constants

APP_NAME = "rnid"
CHUNK_SIZE = (16 * 1024) * 1024
ENCRYPT_EXT = "rfe"
SIG_EXT = "rsg"
SPINNER_SYMS = "⣄⣂⣁⡁⡈⡐⡠"

Spinner animation matching Python's braille spinner.

Class methods

base32_decode(str : String) : Bytes

Simple Base32 decoding (RFC 4648).

Source
base32_encode(data : Bytes) : String

Simple Base32 encoding (RFC 4648).

Source
decode_import(str : String, args : Args) : Bytes

Decode an import string using the selected encoding format.

Source
encode_key(data : Bytes, args : Args) : String

Encode bytes using the selected encoding format.

Source
generate_qr_text(data : String) : String

Generate a text-based QR code from a string.

Source
handle_announce(args : Args, identity : Identity) : Nil

Handle the --announce flag.

Source
handle_decrypt(args : Args, identity : Identity) : Nil

Handle the --decrypt flag.

Source
handle_encrypt(args : Args, identity : Identity) : Nil

Handle the --encrypt flag.

Source
handle_export(args : Args, identity : Identity) : Nil

Handle the --export flag.

Source
handle_generate(args : Args, identity_file : String) : Nil

Handle the --generate flag.

Source
handle_hash(args : Args, identity : Identity) : Nil

Handle the --hash flag.

Source
handle_import(args : Args) : Nil

Handle the --import flag.

Source
handle_print_identity(args : Args, identity : Identity) : Nil

Handle the --print-identity flag.

Source
handle_qr(args : Args, identity : Identity) : Nil

Handle the --qr flag.

Source
handle_sign(args : Args, identity : Identity) : Nil

Handle the --sign flag.

Source
handle_validate(args : Args, identity : Identity) : Nil

Handle the --validate flag.

Source
main(argv : Array(String) = ARGV.to_a)

Main entry point for the rnid binary.

Source
parse_args(argv : Array(String)) : Args

Parse command-line arguments matching Python argparse behavior.

Source
resolve_identity(identity_str : String, args : Args) : Identity

Resolve an identity from hex hash or file path.

Source
spin(msg : String, timeout : Float64 | Nil, &check : -> Bool) : Bool
Source
usage_string

Usage message.

Source
version_string

Version string matching Python's "rnid {version}" format.

Source

Nested types