Package com.sun.identity.log.secure
Class SecureLogHelperJCEImpl
- java.lang.Object
-
- com.sun.identity.log.secure.SecureLogHelper
-
- com.sun.identity.log.secure.SecureLogHelperJCEImpl
-
public class SecureLogHelperJCEImpl extends SecureLogHelper
A helper class for secure logging that generates the MAC and maintaining the key state Refer to Secure Logging Scheme on CMS website
-
-
Constructor Summary
Constructors Constructor Description SecureLogHelperJCEImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]signMAC(byte[] mac)Signs the given MACbooleanverifySignature(byte[] signedObject, byte[] mac)Verifies the given signature-
Methods inherited from class com.sun.identity.log.secure.SecureLogHelper
bytetohex, equalByteArrays, generateLogEntryMAC, getDigest, getLastMAC, getLastSignatureBytes, getLoggerFileName, getLoggerKeyName, getVerifierFileName, initializeSecureLogHelper, initializeVerifier, isIntrusionTrue, reinitializeVerifier, setLastLineforLogger, setLastLineforVerifier, setLoggerKeyName, toByteArray, toHexString, verifyMAC
-
-
-
-
Method Detail
-
signMAC
public byte[] signMAC(byte[] mac) throws ExceptionSigns the given MAC- Specified by:
signMACin classSecureLogHelper- Parameters:
mac- the mac to be signed- Returns:
- signed MAC for given mac entry
- Throws:
Exception- if it fails to sign the MAC
-
verifySignature
public boolean verifySignature(byte[] signedObject, byte[] mac) throws ExceptionVerifies the given signature- Specified by:
verifySignaturein classSecureLogHelper- Parameters:
signedObject- the signature to be verifiedmac- mac entry for the signature- Returns:
- true if signature for mac is valid
- Throws:
Exception- if it fails to verify signature value for mac entry
-
-