Package org.dogtagpki.tps.main
Class Util
java.lang.Object
org.dogtagpki.tps.main.Util
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte
bool2Byte
(boolean value) static TPSBuffer
computeEncEcbDes
(org.mozilla.jss.pkcs11.PK11SymKey symKey, TPSBuffer input) static TPSBuffer
computeMAC
(org.mozilla.jss.pkcs11.PK11SymKey symKey, TPSBuffer input, TPSBuffer icv) static TPSBuffer
computeMACdes3des
(org.mozilla.jss.pkcs11.PK11SymKey symKey, TPSBuffer input, TPSBuffer initialIcv) static TPSBuffer
encryptData
(TPSBuffer dataToEnc, org.mozilla.jss.pkcs11.PK11SymKey encKey) static TPSBuffer
encryptDataAES
(TPSBuffer dataToEnc, org.mozilla.jss.pkcs11.PK11SymKey encKey, TPSBuffer iv) static String
getCertAkiString
(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) static String
getCertSkiString
(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) static String
getTimeStampString
(boolean addMicroSeconds) static int
hexToBin
(char ch) static String
intToHex
(int val) static TPSBuffer
specialDecode
(String str) static String
specialEncode
(TPSBuffer data) static String
specialURLEncode
(byte[] data) static String
specialURLEncode
(TPSBuffer data) static byte[]
static String
static byte[]
uriDecodeFromHex
(String buff) static String
static String
uriEncodeInHex
(byte[] buff)
-
Field Details
-
logger
public static org.slf4j.Logger logger
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
str2ByteArray
-
bool2Byte
public static byte bool2Byte(boolean value) -
hexToBin
public static int hexToBin(char ch) -
intToHex
-
uriDecode
- Throws:
UnsupportedEncodingException
-
uriEncode
- Throws:
UnsupportedEncodingException
-
uriDecodeFromHex
-
uriEncodeInHex
-
specialURLEncode
-
specialURLEncode
-
specialEncode
-
computeEncEcbDes
public static TPSBuffer computeEncEcbDes(org.mozilla.jss.pkcs11.PK11SymKey symKey, TPSBuffer input) throws EBaseException - Throws:
EBaseException
-
computeMACdes3des
public static TPSBuffer computeMACdes3des(org.mozilla.jss.pkcs11.PK11SymKey symKey, TPSBuffer input, TPSBuffer initialIcv) throws EBaseException - Throws:
EBaseException
-
computeMAC
public static TPSBuffer computeMAC(org.mozilla.jss.pkcs11.PK11SymKey symKey, TPSBuffer input, TPSBuffer icv) throws EBaseException - Throws:
EBaseException
-
specialDecode
-
encryptDataAES
public static TPSBuffer encryptDataAES(TPSBuffer dataToEnc, org.mozilla.jss.pkcs11.PK11SymKey encKey, TPSBuffer iv) throws EBaseException - Throws:
EBaseException
-
encryptData
public static TPSBuffer encryptData(TPSBuffer dataToEnc, org.mozilla.jss.pkcs11.PK11SymKey encKey) throws EBaseException - Throws:
EBaseException
-
getCertAkiString
public static String getCertAkiString(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) throws EBaseException, IOException - Throws:
EBaseException
IOException
-
getCertSkiString
public static String getCertSkiString(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) throws EBaseException, IOException - Throws:
EBaseException
IOException
-
getTimeStampString
-