bcrypt-generate

Hash passwords using bcrypt or verify a password against a bcrypt hash. Use when the user asks to bcrypt a password, generate a bcrypt hash, check if a password matches a hash, or store a password securely.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bcrypt-generate" with this command: npx skills add bcrypt-generate

Bcrypt Generate

Hash passwords with bcrypt or verify existing hashes using Python's bcrypt library.

Input

For hashing:

  • Password string to hash
  • Cost/rounds (default: 10, range: 4–31)

For verification:

  • Password string
  • Existing bcrypt hash string (starts with $2b$ or $2a$)

Output

  • Bcrypt hash string (for hashing mode)
  • True/False result (for verification mode)

Instructions

  1. Determine mode: hash a new password, or verify against an existing hash.

  2. Hashing a password:

    python3 -c "import bcrypt; print(bcrypt.hashpw(b'PASSWORD', bcrypt.gensalt(rounds=ROUNDS)).decode())"
    

    Replace PASSWORD with the actual password and ROUNDS with the cost factor (default 10).

  3. Verifying a password against a hash:

    python3 -c "import bcrypt; print(bcrypt.checkpw(b'PASSWORD', b'HASH'))"
    

    Replace PASSWORD and HASH with the actual values.

  4. Check if bcrypt Python package is available before running:

    python3 -c "import bcrypt" 2>&1
    

    If it fails with ModuleNotFoundError, tell the user:

    "This skill requires the Python bcrypt package. Install with: pip3 install bcrypt."

  5. If python3 is not found at all, tell the user:

    "This skill requires python3. Install with: brew install python3 (macOS) or sudo apt install python3 (Linux)."

  6. Present the hash output on its own line. For verification, report clearly: "Password MATCHES the hash" or "Password does NOT match the hash."

Examples

Hash password "mysecret" with cost 10: Command: python3 -c "import bcrypt; print(bcrypt.hashpw(b'mysecret', bcrypt.gensalt(rounds=10)).decode())" Output: $2b$10$EixZaYVK1fsbw1ZfbX3OXePaWxn96p36WQoeG6Lruj3vjPGga31lW

Hash password "admin" with cost 12: Command: python3 -c "import bcrypt; print(bcrypt.hashpw(b'admin', bcrypt.gensalt(rounds=12)).decode())" Output: $2b$12$... (60-char bcrypt hash)

Verify "mysecret" against $2b$10$abc...: Command: python3 -c "import bcrypt; print(bcrypt.checkpw(b'mysecret', b'\$2b\$10\$abc...'))" Output: True

Error Handling

  • python3 not found → tell user to install Python 3
  • bcrypt module not found → tell user to run pip3 install bcrypt
  • Password contains single quotes → escape them or note that the command must be adjusted; prefer using a temp Python script file for complex passwords
  • Hash string malformed (does not start with $2b$ or $2a$) → warn the user the hash appears invalid before running
  • High cost factor (>= 14) → warn the user this will be slow (intentional for security)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated