From 14fe1e0f9681692133b2d76a362eca62b1c273a5 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 25 Sep 2024 02:14:59 -0400 Subject: ID alphabet and generation length were never meant to be shared --- src/id.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/id.rs') diff --git a/src/id.rs b/src/id.rs index 2fb5e0e..5ae61e9 100644 --- a/src/id.rs +++ b/src/id.rs @@ -12,14 +12,14 @@ use std::fmt; // // This leaves 23 ASCII characters, or about 4.52 bits of entropy per character // if generated with uniform probability. -pub const ALPHABET: [char; 23] = [ +const ALPHABET: [char; 23] = [ '1', '2', '3', '4', '6', '7', '8', '9', 'b', 'c', 'd', 'f', 'h', 'j', 'k', 'n', 'p', 'r', 's', 't', 'w', 'x', 'y', ]; // Pick enough characters per ID to make accidental collisions "acceptably" unlikely // without also making them _too_ unwieldy. This gives a fraction under 68 bits per ID. -pub const ID_SIZE: usize = 15; +const ID_SIZE: usize = 15; // Intended to be wrapped in a newtype that provides both type-based separation // from other identifier types, and a unique prefix to allow the intended type -- cgit v1.2.3