Skip to content

A high-performance binary encryption and decryption library that supports customizable character sets beyond Base64.

License

Notifications You must be signed in to change notification settings

ltpp-universe/bin-encrypt-decrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bin-encrypt-decrypt

Official Documentation

A high-performance binary encryption and decryption library that supports customizable character sets beyond Base64.

Features

  • Custom Character Sets: Define your own character set for encoding and decoding, allowing for flexible data representation.
  • High Performance: Optimized for speed, making it suitable for applications requiring efficient cryptographic operations.
  • Simple API: Intuitive and easy-to-use interface for both encryption and decryption processes.
  • Robust Error Handling: Provides clear and descriptive error messages to facilitate debugging.
  • Extensive Documentation: Comprehensive guides and examples to help you get started quickly.

Installation

To install bin-encrypt-decrypt run cmd:

cargo add bin-encrypt-decrypt

Usage

Encrypt

Use Struct

use bin_encrypt_decrypt::*;
let mut crypt_decrypt: CryptDecrypt<'_> = CryptDecrypt::new();
let test_str: &str = "test";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
crypt_decrypt.charset(&charset);
let encode: Result<String, CryptError> = crypt_decrypt.encrypt(test_str);

Use Function

use bin_encrypt_decrypt::*;
let test_str: &str = "test";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
let encode: Result<String, CryptError> = encrypt(&charset, test_str);

Decrypt

Use Struct

use bin_encrypt_decrypt::*;
let mut crypt_decrypt: CryptDecrypt<'_> = CryptDecrypt::new();
let test_str: &str = "aab0aabLaabZaab0";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
crypt_decrypt.charset(&charset);
let decode: Result<String, DecryptError> = crypt_decrypt.decrypt(test_str);

Use Function

use bin_encrypt_decrypt::*;
let test_str: &str = "aab0aabLaabZaab0";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
let decode: Result<String, DecryptError> = decrypt(&charset, test_str);

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Contact

For any inquiries, please reach out to the author at ltpp-universe [email protected].

About

A high-performance binary encryption and decryption library that supports customizable character sets beyond Base64.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published