0.1.10 β€’ Published 5 months ago

secure-storage-wasm v0.1.10

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

Secure Storage πŸ”’

Rust WebAssembly ChaCha20-Poly1305

πŸš€ Overview

Secure Storage πŸ”’ is a WebAssembly (WASM) module written in Rust that provides secure, high-performance encryption and decryption capabilities using the ChaCha20-Poly1305 AEAD (Authenticated Encryption with Associated Data) algorithm. This project is ideal for securely storing and transmitting sensitive data in web applications.

✨ Features

  1. βœ… End-to-end Encryption - Uses the ChaCha20-Poly1305 cipher for secure data encryption.
  2. βœ… WASM Powered - High-performance cryptographic operations in the browser.
  3. βœ… Lightweight & Fast - Rust’s efficiency ensures minimal overhead.
  4. βœ… Authenticated Encryption - Ensures data integrity and authenticity.

Configuration

To include wasm into your application, Based on the bundler

Vite

    // To configure vite with wasm
    import wasm from "vite-plugin-wasm";
    
    // https://vite.dev/config/
    export default defineConfig({
        plugins: [react(), wasm()],
    })

πŸ› οΈ Usage

    import { getItem, setItem, clear } from "secure-storage";
    
    // To store data with encryption
    setItem("key", "data")
    // To store raw data (without encryption)
    setItem("key", "data", true)
    getItem("key") // -> string

πŸ“š API Reference

set_item(key: string, data: string, encrypted?: boolean | null) => void

@default: encrypted = true Generates and sets the encrypted/raw data in the localstorage based on encrypted boolean

get_item(key: string) => string

Gets the decrypted data in the localstorage

remove(key: string) => void

Removes the key from localstorage

clear() => void

Clears the localstorage

βœ”οΈ Compatible web engine

Here is the list of tested web engine, 1. Chromium 2. Safari 3. Gecko

βœ”οΈ Supported frameworks

  1. Vite
  2. Nextjs
  3. Vuejs
  4. create-react-route

And few more testing in progress.

🀝 Contributing

We welcome contributions! Feel free to submit issues, feature requests, or pull requests.

  1. Fork the repo
  2. Create a new branch: git checkout -b feature-branch
  3. Commit changes: git commit -m "Add a new feature"
  4. Push to the branch: git push origin feature-branch
  5. Create a Pull Request

πŸ“œ License

This project is licensed under the MIT License.

πŸ™Œ Acknowledgments

Special thanks to the Rust and WebAssembly communities for their amazing tools and documentation!


πŸš€ Secure your data with Secure Storage πŸ”’ today!

0.1.10

5 months ago

0.1.9

5 months ago

0.1.8

5 months ago

0.1.7

5 months ago

0.1.6

5 months ago

0.1.5

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago