Java icon indicating copy to clipboard operation
Java copied to clipboard

Add One-Time Pad Cipher implementation

Open Nihhaar0002 opened this issue 2 weeks ago • 1 comments

This PR adds an implementation of the One-Time Pad (OTP) cipher using XOR.

  • Generates a random key using SecureRandom.
  • Encrypts and decrypts using XOR.
  • Validates matching key and message length.
  • Includes JUnit tests for multiple cases.
  • Adds comments explaining cryptographic limitations.

All tests passed successfully.

Nihhaar0002 avatar Nov 25 '25 06:11 Nihhaar0002