HashSlap-Summer-of-Code/cipher-vault

Add Error Handling to Python Cipher Scripts

開放

#9 建立於 2025年6月19日

 (1 則留言) (0 個反應) (0 位負責人)JavaScript (7 個分叉)auto 404
HSSOCIntermediateenhancementgood first issuehacktoberfest

倉庫指標

星標
 (0 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Description:
Enhance the reliability of the existing Python cipher scripts (e.g., Caesar, AES) by adding input validation and exception handling. This improves the user experience and script robustness.

Expected Tasks:

  • Review all Python files in the ciphers/ folder
  • Add try-except blocks to handle:
    • Non-string input
    • Incorrect key sizes
    • Unsupported characters
  • Write meaningful error messages and avoid crashes
  • Create a new file ERROR_HANDLING.md to document:
    • Types of handled errors
    • Example error messages

Stretch Tasks:

  • Use custom exception classes (e.g., InvalidKeyError)
  • Add unit tests to verify error handling works

貢獻者指南