UK Data: Secure generators

v1.5.0
uk.co.reliness/generators Checked 13 hours ago Published 25 days ago

Passwords, random numbers and strings, colours, usernames and card draws from a secure random source

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

draw_cards

Draws a specified number of cards from a shuffled standard 52-card deck using a cryptographically secure random source. (cost: 1 credit)

ParameterTypeDescription
num_drawstringinteger, required, number of cards to draw (1-52)

generate_random_color

Generates a random color in hexadecimal format (e.g., #A3F2B1) using a cryptographically secure random source. (cost: 1 credit)

generate_password

Generates a cryptographically secure random password with specified length and character type requirements (uppercase, lowercase, numbers, symbols). (cost: 1 credit)

ParameterTypeDescription
include_lowercaseboolean | stringboolean, optional, include lowercase letters, no unit, default true
include_numbersboolean | stringboolean, optional, include numeric digits, no unit, default true
include_symbolsboolean | stringboolean, optional, include special symbols, no unit, default true
include_uppercaseboolean | stringboolean, optional, include uppercase letters, no unit, default true
lengthstringinteger, required, length of password, characters, no default

generate_random_number

Generates a cryptographically secure random integer within a specified range (inclusive). Uses a secure random source. (cost: 1 credit)

ParameterTypeDescription
maxstringinteger, required, maximum value (inclusive), no unit, no default
minstringinteger, required, minimum value (inclusive), no unit, no default

generate_username

Generates a unique username by combining first name, last name, and birth year with a random suffix using a cryptographically secure random source. (cost: 1 credit)

ParameterTypeDescription
birth_yearstringinteger, required, user's birth year, year, no default
first_namestringstring, required, user's first name, no units, no default
last_namestringstring, required, user's last name, no units, no default

generate_random_string

Generates a random string of specified length from a given character set using a cryptographically secure random source. Returns the generated string. (cost: 1 credit)

ParameterTypeDescription
charactersstringstring, optional, character set to use for generation, default 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
lengthstringinteger, required, length of the string to generate (must be positive)