Package javatapas.string
Class EncryptString
java.lang.Object
javatapas.string.EncryptString
public class EncryptString extends Object
Encrypt a String using AES algorithm.
Published at https://www.javatapas.com/string/Java-Encrypt-String.html
Javadoc at https://www.javatapas.com/docs/javatapas/string/EncryptString.html
Published at https://www.javatapas.com/string/Java-Encrypt-String.html
Javadoc at https://www.javatapas.com/docs/javatapas/string/EncryptString.html
- Version:
- 2021-05-26
- Author:
- Kodiak Brown
-
Constructor Summary
Constructors Constructor Description EncryptString()
-
Method Summary
Modifier and Type Method Description static byte[]
encryptString(String inStr)
Encrypts a String using AES algorithm.
-
Constructor Details
-
EncryptString
public EncryptString()
-
-
Method Details
-
encryptString
public static byte[] encryptString(String inStr) throws NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, NoSuchPaddingException, BadPaddingExceptionEncrypts a String using AES algorithm.- Parameters:
inStr
- The String to be encrypted.- Returns:
- Encrypted String as a byte array.
- Throws:
NoSuchAlgorithmException
InvalidKeyException
IllegalBlockSizeException
NoSuchPaddingException
BadPaddingException
-