use of com.checkmarx.sdk.exception.ScannerRuntimeException in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class AstClientHelper method getLatestScanResults.
@Override
public ResultsBase getLatestScanResults() {
log.error("Unsupported Operation.");
ASTResults result = new ASTResults();
result.setException(new ScannerRuntimeException(new UnsupportedOperationException()));
return result;
}
use of com.checkmarx.sdk.exception.ScannerRuntimeException in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class Sha1SignatureCalculator method calculateSignature.
@Override
public CxSCAFileSignature calculateSignature(byte[] content) throws ScannerRuntimeException {
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-1");
} catch (NoSuchAlgorithmException e) {
throw new ScannerRuntimeException("Unable to use SHA-1 algorithm", e);
}
digest.update(content);
return new CxSCAFileSignature(SHA1_SIGNATURE_TYPE_NAME, Hex.encodeHexString(digest.digest()));
}
Aggregations