#!/usr/bin/env python3

# Password Card 0.2.3 The Unlicense

import string, hashlib, random

CHARS = string.digits + string.punctuation + string.ascii_lowercase + string.ascii_uppercase
ROWS, COLS = 3, 3

password = input("Password: ")
salt = "変更推奨ソルト"

key = hashlib.pbkdf2_hmac('sha512', password.encode(), salt.encode(), 100_000)
rng = random.Random(int.from_bytes(key, "big"))

for count, _ in enumerate(range(ROWS * COLS), start=1):
    k, v = rng.choice(CHARS), rng.choice(CHARS)
    print(f"{k}:{v}({count:02})", end=' ')
    if count % COLS == 0:
        print()
Edit

Pub: 26 Aug 2025 16:07 UTC

Edit: 27 Sep 2025 10:45 UTC

Views: 85

Auto Theme: Dark