lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

lib.rs (1270B)


      1 #![cfg_attr(not(feature = "std"), no_std)]
      2 #![cfg_attr(coverage_nightly, feature(coverage_attribute))]
      3 #![forbid(unsafe_code)]
      4 
      5 #[cfg(not(feature = "std"))]
      6 extern crate alloc;
      7 
      8 pub mod error;
      9 pub mod identity;
     10 #[cfg(feature = "std")]
     11 pub mod storage;
     12 pub mod username;
     13 
     14 pub use error::IdentityError;
     15 pub use identity::{
     16     DEFAULT_IDENTITY_PATH, RadrootsIdentity, RadrootsIdentityFile, RadrootsIdentityId,
     17     RadrootsIdentityProfile, RadrootsIdentityPublic, RadrootsIdentitySecretKeyFormat,
     18 };
     19 #[cfg(feature = "nip49")]
     20 pub use identity::{
     21     RadrootsIdentityEncryptedSecretKeyOptions, RadrootsIdentityEncryptedSecretKeySecurity,
     22 };
     23 #[cfg(feature = "std")]
     24 pub use storage::{
     25     RADROOTS_ENCRYPTED_IDENTITY_DEFAULT_KEY_SLOT, RADROOTS_ENCRYPTED_IDENTITY_KEY_SUFFIX,
     26     RadrootsEncryptedIdentityFile, encrypted_identity_wrapping_key_path, load_encrypted_identity,
     27     load_encrypted_identity_with_key_slot, load_identity_profile, rotate_encrypted_identity,
     28     rotate_encrypted_identity_with_key_slot, store_encrypted_identity,
     29     store_encrypted_identity_with_key_slot, store_identity_profile,
     30 };
     31 pub use username::{
     32     RADROOTS_USERNAME_MAX_LEN, RADROOTS_USERNAME_MIN_LEN, RADROOTS_USERNAME_REGEX,
     33     radroots_username_is_valid, radroots_username_normalize,
     34 };