Skip to main content

Crate shavee_core

Crate shavee_core 

Source
Expand description

Shavee Core: A library for ZFS dataset encryption management.

This library provides the core logic for generating encryption keys for ZFS datasets using various 2FA methods like Yubikeys and files.

Modules§

filehash
File-based 2FA: hashing a file’s content to derive an encryption key.
logic
Orchestration logic for Shavee encryption workflows.
password
Password hashing and key derivation utilities using Argon2.
structs
Data structures for Shavee configuration.
yubikey
Yubikey HMAC-SHA1 challenge-response utilities.
zfs
ZFS interactions for encryption management.

Enums§

Error
Core error type for the Shavee library.

Constants§

ENV_SALT_VARIABLE
Name of the environment variable used to store a custom salt.
RANDOM_SALT_LEN
Length of the random salt in bytes. Must be at least 16 bytes for security.
STATIC_SALT
Static salt for backward compatibility with earlier versions.
UNREACHABLE_CODE
Predefined message for unreachable code paths.

Functions§

error
Logs an error message if the “trace” feature is enabled.
parse_file_size_arguments
Parses file and size arguments, typically from CLI input.
trace
Logs a trace message if the “trace” feature is enabled.
trace_init
Initializes the logging system if the “trace” feature is enabled.

Type Aliases§

Result
Result type alias for Shavee core operations.