package com.avg.zaap.crashlibrary.publish.cap;

/**
 * This class serves as the default implementation of the CAP helper.
 * <p>
 * Created by marek.osvald on 18.7.2016.
 */
public class CapHelper implements ICapHelper {

    @Override
    public String getExceptionCodeFromCrashCode(String crashCode) {
        return HEX_PREFIX + crashCode.replace("-", "").substring(0, CAP_CRASH_ID_LENGTH);
    }

    @Override
    public String getCapFaultingHexOffset(int offset) {
        return HEX_PREFIX + Integer.toHexString(offset);
    }

}
