Class 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 Detail

      • SecureLogHelperJCEImpl

        public SecureLogHelperJCEImpl()
    • Method Detail

      • signMAC

        public byte[] signMAC​(byte[] mac)
                       throws Exception
        Signs the given MAC
        Specified by:
        signMAC in class SecureLogHelper
        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 Exception
        Verifies the given signature
        Specified by:
        verifySignature in class SecureLogHelper
        Parameters:
        signedObject - the signature to be verified
        mac - 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