Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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);
}
```