Package edu.uiuc.ncsa.security.util.pkcs
Class EncryptionUtil
- java.lang.Object
- 
- edu.uiuc.ncsa.security.util.pkcs.EncryptionUtil
 
- 
 public class EncryptionUtil extends Object Utility to password protect files. This takes a password and any text and password protects it. The longer the password, the better the protection.Usageencrypt - returns an encrypted text with header. isEncrypted - checks if the argument has been encrypted with this utility Don't call decrypt without this decrypt - returns unencrypted contents.NoteThis requires a password and a string to be encrypted. The longer the password, the better the protection.Created by Jeff Gaynor 
 on 7/19/21 at 9:52 AM
- 
- 
Field SummaryFields Modifier and Type Field Description static StringPASSWORD_HEADER
 - 
Constructor SummaryConstructors Constructor Description EncryptionUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdecrypt(String encoded, String password)static Stringencrypt(String text, String password)static booleanisEncrypted(String text)static voidmain(String[] args)
 
- 
- 
- 
Field Detail- 
PASSWORD_HEADERpublic static String PASSWORD_HEADER 
 
- 
 - 
Method Detail- 
mainpublic static void main(String[] args) throws IllegalAccessException - Throws:
- IllegalAccessException
 
 - 
decryptpublic static String decrypt(String encoded, String password) throws IllegalAccessException - Throws:
- IllegalAccessException
 
 - 
isEncryptedpublic static boolean isEncrypted(String text) 
 
- 
 
-