bt_secure_storage

Crates.iobt_secure_storage
lib.rsbt_secure_storage
version0.2.4
created_at2025-10-28 14:15:03.872032+00
updated_at2025-11-24 21:52:22.687399+00
descriptionA simple and lightweight Secret Vault and Encryption Library for Rust to store secrets
homepagehttps://github.com/bachuetech/bt_secure_storage
repositoryhttps://github.com/bachuetech/bt_secure_storage.git
max_upload_size
id1904811
size85,864
(bachuetech)

documentation

README

Project Title

BT Secure Storage

Description

This library provides a simple secret vault and encryption system using the whoami crate to get the username and the keyring backend to store secrets securely. It also includes an encryption/decryption system based on AES.

Features

  • Secure Secret Storage: Store sensitive data like passwords, API keys, or tokens securely.
  • Encryption/Decryption: Use AES for encrypting and decrypting data.
  • Test Cases: Unit tests are included to verify the functionality of the library.

Usage

    let vault = SecretVault::new("my_app");
    let cipher = SecretCipher::new();

    // Store a secret securely
    let service_name = "my_service";
    let secret = "super_sensitive_data";
    vault.store_secret(service_name, secret)?;

    // Retrieve the stored secret
    let retrieved_secret = vault.retrieve_secret(service_name)?;
    assert_eq!(retrieved_secret, secret);

    // Encrypt and decrypt data using AES
    let encrypted_data = cipher.encrypt_secret(secret, "my_key")?;
    let decrypted_data = cipher.decrypt_secret(&encrypted_data.0, &encrypted_data.1, "my_key")?;

Version History

  • 0.1.0
    • Initial Release
  • 0.1.1
    • Make mod public
  • 0.1.2
    • Make hashing functions public
  • 0.1.2
    • Update dependencies
  • 0.2.0
    • Change to Base91 encoding from Based64 to reduce overhead in encrypt_secret
  • 0.2.1
    • Change Salt from 32 to 12 bytes
  • 0.2.2
    • Support for long secrets under windows using encrypted file.
  • 0.2.3
    • Cleaner code.
  • 0.2.4
    • Improve file name for long secrets

License

GPL-3.0-only

Commit count: 0

cargo fmt