#encryption-decryption #decryption #character-set #high-performance #customcharset #base64alternative #binaryencryption

bin-encrypt-decrypt

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

8 stable releases

2.2.1 Dec 8, 2024
2.2.0 Dec 1, 2024
2.1.0 Nov 30, 2024
1.3.0 Oct 27, 2024
0.1.0 Oct 27, 2024

#371 in Cryptography

Download history 105/week @ 2024-10-21 108/week @ 2024-10-28 21/week @ 2024-11-04 1/week @ 2024-11-18 275/week @ 2024-11-25 196/week @ 2024-12-02 73/week @ 2024-12-09

545 downloads per month

MIT license

18KB
276 lines

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 root@ltpp.vip.

Dependencies

~25KB