wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Password Generator - Lisp

profile
Aniket Panchal
Jul 16, 2025
0 Likes
0 Discussions
1 Reads

Program (Raw):

(defparameter *chars* "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*")


(defun random-char ()

(char *chars* (random (length *chars*))))


(defun generate-password (length)

(coerce (loop repeat length collect (random-char)) 'string))


(defun test-generator ()

"Test the password generator"

(format t "Password (8 chars): ~a~%" (generate-password 8))

(format t "Password (12 chars): ~a~%" (generate-password 12))

(format t "Password (16 chars): ~a~%" (generate-password 16)))


(setf *random-state* (make-random-state t))


(test-generator)


Program (Beautified):


Output:


Comments ()


Sign in

Read Next

Assignment 2

Blog banner

Virtual memory

Blog banner

Deadlock

Blog banner

Embaded operating system

Blog banner

Smartphone Security: Vulnerabilities and Attacks

Blog banner

Risk management in IT

Blog banner

BUFFER OVERFLOW_142

Blog banner

John Titor: The Time Traveler

Blog banner

Fashion marketing in india

Blog banner

Deadlock Prevention

Blog banner

Modern Operating System - Suren Kotian

Blog banner

Different types of scam Fraud

Blog banner

Fitness

Blog banner

Heart Fulness Meditation

Blog banner

Fault tolerance

Blog banner

The Golden Temple , Amritsar

Blog banner

File system

Blog banner

Smart Homes | Zigbee Alliance

Blog banner

My Favorite Sportsperson

Blog banner

Blockchain Transactions

Blog banner

Network Security Risks

Blog banner

10 Interesting Facts about Attack on Titan

Blog banner

Security Issues and Countermeasures

Blog banner

Instagram

Blog banner

City of Mumbai (Bombay):

Blog banner

Proton mail

Blog banner

Having passion in life

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Os Virtual Memory

Blog banner

File sharing

Blog banner

File System

Blog banner

Drawing tips for a beginner

Blog banner

How Harshad Valia International School is nurturing India’s Young Minds?

Blog banner

Respondo Launches Revolutionary Video Discussion App

Blog banner

MySQL

Blog banner

15 Websites that will make your life easier ...!!!

Blog banner

This Windows 11 encryption bug may cause data damage

Blog banner

Safe Learning Spaces: Why Preschool Environment Matters More Than Ever Today

Blog banner

Classification Vs Clustring? What's the diffrence?

Blog banner

Use case of K-means clustering

Blog banner

What is Segmentation?

Blog banner

The Benefits of Mixed Learning Activities for Preschoolers

Blog banner