https://github.com/just-do-halee/vep
Variable-length Expansion Pass function. ( i.e. short password to long hashed password )
https://github.com/just-do-halee/vep
algorithms cryptography expansion hash no-std password
Last synced: about 1 year ago
JSON representation
Variable-length Expansion Pass function. ( i.e. short password to long hashed password )
- Host: GitHub
- URL: https://github.com/just-do-halee/vep
- Owner: just-do-halee
- License: apache-2.0
- Created: 2021-08-22T16:28:12.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-07T03:16:45.000Z (almost 5 years ago)
- Last Synced: 2025-05-19T00:17:51.194Z (about 1 year ago)
- Topics: algorithms, cryptography, expansion, hash, no-std, password
- Language: Rust
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# **`vep`**
Variable-length Expansion Pass function. ( i.e. short password to long hashed password )
[![CI][ci-badge]][ci-url]
[![Crates.io][crates-badge]][crates-url]
[![Licensed][license-badge]][license-url]
[![Twitter][twitter-badge]][twitter-url]
[ci-badge]: https://github.com/just-do-halee/vep/actions/workflows/ci.yml/badge.svg
[crates-badge]: https://img.shields.io/crates/v/vep.svg?labelColor=383636
[license-badge]: https://img.shields.io/crates/l/vep?labelColor=383636
[twitter-badge]: https://img.shields.io/twitter/follow/do_halee?style=flat&logo=twitter&color=4a4646&labelColor=333131&label=just-do-halee
[ci-url]: https://github.com/just-do-halee/vep/actions
[twitter-url]: https://twitter.com/do_halee
[crates-url]: https://crates.io/crates/vep
[license-url]: https://github.com/just-do-halee/vep
| [Docs](https://docs.rs/vep) | [Latest Note](https://github.com/just-do-halee/vep/blob/main/CHANGELOG.md) |
```toml
[dependencies]
vep = "2.1.0"
```
or
```toml
[dependencies]
vep = { version = "2.1.0", default-features = false } # no-std
```
---
## How to
```rust
use vep::Vep;
use sha2::{Sha256, Digest}; // can be any hasher(dyn Digest from `digest` crate)
let src = b"hello vep!"; // <- 10 bytes
let expanded = Vep(Sha256::new()).expand(src); // -> 10 * 32 bytes == `320 bytes`
assert_eq!(expanded.len(), Vep::::output_size_calc(src));
```
## Fixed size available
```rust
let src = b"hello vep!"; // <- 10 bytes
let result = Vep(Sha256::new()).expand_and_then_reduce(src); // -> 320 bytes -> `32 bytes` (reduced)
assert_eq!(result.len(), Vep::::reduced_size_calc());
```
---
## * Algorithm
---
