Skip to content

v1.0.0

Choose a tag to compare

@jackspirou jackspirou released this 06 Jul 20:26
cad0c80

Initial Stable Release

The uuidkey package encodes UUIDs to a readable Key format via the Base32-Crockford codec.

Features

  • ✅ UUID to Key encoding using Base32-Crockford
  • ✅ API Key generation with configurable entropy (128/160/256 bits)
  • ✅ CRC32 checksum validation
  • ✅ GitHub Secret Scanning format support
  • ✅ With/without hyphens formatting options
  • ✅ Full UUID compatibility (gofrs/uuid and google/uuid)

Installation

go get github.com/agentstation/uuidkey@v1.0.0

Example Usage

// Create API Key
apiKey, _ := uuidkey.NewAPIKey("MYAPP", "d1756360-5da0-40df-9926-a76abff5601d")
fmt.Println(apiKey) // MYAPP_38QARV01ET0G6Z2CJD9VA2ZZAR0X...

// Encode UUID to Key
key, _ := uuidkey.Encode("d1756360-5da0-40df-9926-a76abff5601d")
fmt.Println(key) // 38QARV0-1ET0G6Z-2CJD9VA-2ZZAR0X

Documentation

See the README for full documentation.