java.lang.Object
org.seppiko.commons.utils.crypto.CipherNameUtil
- All Implemented Interfaces:
Serializable
Cipher name utility
- Author:
- Leonard Woo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCipherNameUtil(String algorithm) Parser cipher nameCipherNameUtil(String name, String mode, String padding) Initialization cipher name -
Method Summary
-
Constructor Details
-
CipherNameUtil
public CipherNameUtil(String name, String mode, String padding) throws NullPointerException, IllegalArgumentException Initialization cipher name- Parameters:
name- Algorithm Name.mode- Algorithm Mode.padding- Algorithm Padding.- Throws:
NullPointerException- Name isnull.IllegalArgumentException- Mode and Padding must benullat the same time, or notnullat the same time.
-
CipherNameUtil
Parser cipher name- Parameters:
algorithm-Name[/Mode/Padding]].- Throws:
IllegalArgumentException- Algorithm String format is wrong.NullPointerException- Algorithm name isnull.
-
-
Method Details
-
getName
Get name- Returns:
- Name
-
getMode
Get mode- Returns:
- Mode
-
getPadding
Get padding- Returns:
- Padding
-
equals
CheckCipherNameUtilinstance equal- Overrides:
equalsin classObject- Parameters:
o- aCipherNameUtilinstance.- Returns:
- true, if object is
CipherNameUtiland equals.
-
hashCode
public int hashCode()CipherNameUtil object hashcode -
toString
Re-splicing algorithm name
-