| Crates.io | bin-encrypt-decrypt |
| lib.rs | bin-encrypt-decrypt |
| version | 2.2.8 |
| created_at | 2024-10-27 07:56:18.285016+00 |
| updated_at | 2025-02-09 08:18:58.703093+00 |
| description | A high-performance binary encryption and decryption library that supports customizable character sets beyond Base64. |
| homepage | |
| repository | https://github.com/ltpp-universe/bin-crypt-decrypt |
| max_upload_size | |
| id | 1424396 |
| size | 23,016 |
A high-performance binary encryption and decryption library that supports customizable character sets beyond Base64.
To install bin-encrypt-decrypt run cmd:
cargo add bin-encrypt-decrypt
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 bin_encrypt_decrypt::*;
let test_str: &str = "test";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
let encode: Result<String, CryptError> = encrypt(&charset, test_str);
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 bin_encrypt_decrypt::*;
let test_str: &str = "aab0aabLaabZaab0";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
let decode: Result<String, DecryptError> = decrypt(&charset, test_str);
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.