Crates.io | cybertoken |
lib.rs | cybertoken |
version | 1.0.1 |
source | src |
created_at | 2024-01-15 13:59:18.64257 |
updated_at | 2024-01-15 14:03:46.48455 |
description | A Rust implementation of the cybertoken, a token format inspired by the GitHub API token format. |
homepage | |
repository | https://github.com/lucagoslar/cybertoken-rs |
max_upload_size | |
id | 1100350 |
size | 36,893 |
A Rust implementation of the cybertoken, a token format inspired by the GitHub API token format.
Licensed under MIT or APACHE 2.0 or EUPL v 1.2.
Extend your Cargo.toml
configuration file to include cybertoken
as a dependency or install the package with the Cargo package manager.
cargo add cybertoken
use cybertoken::Cybertoken;
fn main() {
let cybertoken = Cybertoken::new("zugriff");
let token = cybertoken.generate_token();
println!("{}", token); // zugriff_2uiWaFKqkMD9CLdUqrYZd2BWYfj2gz806DP5P
println!("valid {}", cybertoken.is_token_string("zugriff_icnocrRLDoZ3uCPosLA0277hQ58ob379X43U")); // valid true
}