-1

Could you please share a working example of encryption using Java where encrypted string and the orginal string length is always the same?

Or you can share the algorithm as well.

Debopam
  • 3,010
  • 5
  • 39
  • 62

1 Answers1

2

This algorithm is called "One Time Pad" See here:

One time pad, encryption and decryption

And here: One time pad, encryption and decryption

It uses a key that has the same length as the encrypted message.

FileInputStream
  • 106
  • 2
  • 11