Module: Baseh::Profile
- Defined in:
- lib/baseh/profile.rb
Overview
Profile validation and derived values, spec section 2.2. Validation runs once at construction, never per encode/decode.
Profiles are plain hashes with symbol keys:
profile_id:, body_alphabet:, body_length:, checksum_alphabet:,
checksum_length:, case_sensitive:, separator:, grouping:, aliases:,
permutation: { enabled: true, algorithm: "feistel-v1", key_id:,
key_bytes:, rounds: } or { enabled: false },
profanity: { mode: "none" | "no-vowels" | "blocklist",
words: [...], extra_words: [...] } (optional, spec 18)
Defined Under Namespace
Classes: Prepared
Constant Summary collapse
- ASCII_ONLY =
/\A[\x20-\x7e]*\z/.freeze
Class Method Summary collapse
-
.prepare(profile) ⇒ Object
Validates a profile hash and returns a Prepared instance.