Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abrarnitk/encrypted_id
This repository contains code related to Rust models encryption and decryption
https://github.com/abrarnitk/encrypted_id
decryption decryption-key encryption encryption-decryption encryption-key rust
Last synced: 5 days ago
JSON representation
This repository contains code related to Rust models encryption and decryption
- Host: GitHub
- URL: https://github.com/abrarnitk/encrypted_id
- Owner: AbrarNitk
- License: mit
- Created: 2020-04-11T07:22:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T10:14:39.000Z (over 4 years ago)
- Last Synced: 2024-12-16T22:51:48.262Z (6 days ago)
- Topics: decryption, decryption-key, encryption, encryption-decryption, encryption-key, rust
- Language: Rust
- Size: 18.9 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Encrypted ID
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Crates.io](https://img.shields.io/crates/v/encrypted_id)](https://crates.io/crates/encrypted_id)
[![Build Status](https://travis-ci.org/AbrarNitk/encrypted_id.svg?branch=master)](https://travis-ci.org/AbrarNitk/encrypted_id)Read more about this library on: [fifthtry.com/abrar/encrypted_id/](https://www.fifthtry.com/abrar/encrypted_id/).
#### Usage
```toml
[dependencies]
encrypted_id = "0.1.5"
``````rust
fn main() {
encrypted_id::init("df(vh!3*8e21@qca#3)w#7ta*z#!bhsde43iez3sf5m1#h6l");
let ekey = encrypted_id::encrypt(5, "sub_key_foo").unwrap();
let id = encrypted_id::decrypt(&ekey, "sub_key_foo").unwrap();
assert_eq!("E86VGQhfxb_9rxSfjnBqKg", ekey);
assert_eq!(5, dkey);
}
```