Skip to content
@archipel/platform-cryptography Auto-generated

@breadstone/archipel-platform-cryptography

Classes

ClassDescription
BcryptServiceThe BcryptService class. Provides bcrypt hashing and comparison with configurable salt rounds, optional pepper (HMAC pre-hash), and SHA-256 pre-hash for passwords exceeding bcrypt's 72-byte input limit.
CryptographyErrorBase class for cryptography-related domain errors.
CryptoServiceThe CryptoService class. Represents the service that provides cryptographic operations.
InvalidOtpErrorThrown when an OTP token fails verification.
OtpServiceOTP service implementation backed by otplib v13.
WeakPasswordErrorThrown when a password does not meet the minimum strength requirements.

Interfaces

InterfaceDescription
IBcryptOptionsConfiguration options for BcryptService.
IOtpOptionsConfiguration options for OtpService.
IOtpServiceAbstraction over OTP (One-Time Password) operations.
IOtpUriOptionsOptions for generating an OTP authentication URI (otpauth://).

Variables

VariableDescription
BCRYPT_OPTIONSInjection token for bcrypt options.
MAX_BCRYPT_PASSWORD_BYTESMaximum password byte length that bcrypt processes without truncation.
MIN_BCRYPT_ROUNDSMinimum number of bcrypt salt rounds enforced by the service (OWASP ≥ 12).
OTP_OPTIONSInjection token for OTP service options.
OTP_SERVICE_TOKENInjection token for the OTP service abstraction.
TOTP_EPOCH_TOLERANCEDefault TOTP verification tolerance expressed in seconds (otplib v13 epochTolerance).

Released under the MIT License.