api_key 0.1.0

Generate api key in rust supports base32, base62, string, uuid4, uuid5
Documentation

api_key

A Rust utility for generating API keys including random strings, UUIDs, and keys based on specific encoding schemes like Base32 and Base62.

Rust port of https://github.com/pauldenver/generate-api-key

Example for generating random string with prefix

 let options = StringGenerator {
    prefix: String::from("PREFIX"),
    ..StringGenerator::default()
  };

  let key: ApiKeyResults = api_key::string(options);

  assert!(match key {
    ApiKeyResults::String(d) => d.starts_with("PREFIX"),
    _ => false,
  })
  • improve crate documentation
  • improve README