* ============LICENSE_END=========================================================
*/
-package org.onap.oom.certservice.cmpv2client.impl;
+package org.onap.oom.certservice.cmpv2client.impl.protections;
import org.bouncycastle.asn1.DERBitString;
import org.bouncycastle.asn1.cmp.PKIBody;
*
* @return bytes representing protection wrapped into DERBitString object.
*/
- DERBitString generatePkiMessageProtection(PKIHeader pkiHeader, PKIBody pkiBody) throws CmpClientException {
+ public DERBitString generatePkiMessageProtection(PKIHeader pkiHeader, PKIBody pkiBody) throws CmpClientException {
try {
byte[] protectedBytes = generateProtectedBytes(pkiHeader, pkiBody);
byte[] protectionBytes = generateProtectionBytes(protectedBytes);
}
/**
- * Takes encoded bytes of PKIMessage (PKIHeader and PKIBody) and generates protection bytes.
+ * Returns Algorithm Identifier for protection of PKIMessage.
*
- * @return bytes representing protection.
+ * @return Algorithm Identifier.
*/
- abstract byte[] generateProtectionBytes(byte[] protectedBytes) throws GeneralSecurityException;
+ public abstract AlgorithmIdentifier getAlgorithmIdentifier();
/**
- * Returns Algorithm Identifier for protection of PKIMessage.
+ * Takes encoded bytes of PKIMessage (PKIHeader and PKIBody) and generates protection bytes.
*
- * @return Algorithm Identifier.
+ * @return bytes representing protection.
*/
- abstract AlgorithmIdentifier getAlgorithmIdentifier();
+ abstract byte[] generateProtectionBytes(byte[] protectedBytes) throws GeneralSecurityException;
}