0

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,198
  • 6
  • 41
  • 72

1 Answers1

3

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
  • 126
  • 2
  • 11