Simplest way to encrypt a text file in java

前端 未结 11 1517
萌比男神i
萌比男神i 2020-11-30 01:18

For my School project I had to show that I can utilize file handling within a program. For this I made a very simple login process that you can create an account on that wri

11条回答
  •  猫巷女王i
    2020-11-30 01:56

    There are too many ways to encrypted simple string in Java. If it is a school project , I really don't think you can get a higher band by simply using some third-part libs to finish the encrypted work.

    If you have some time, you could try to understand how Base64 works, then try to create some encrypted algorithm by yourself.

    How ever, if you insist to use some API in Java , I have to say that DES is really old way to encrypted text , 3DEs(DESede) or AES will be better and safer , both of them have already been supported since Java6.

    If you have to import the BouncyCastle lib , I prefer IDEA, it's one of the safest algorithm, may have you achieve a good score.

    I won't give you any demo code, but you can easily find some by google all the algorithm I have mentioned.

提交回复
热议问题