@Override public byte[] checksum(byte[] data, int start, int len) throws KrbException { int outputSize = outputSize(); HashProvider hp = hashProvider(); hp.hash(data, start, len); byte[] workBuffer = hp.output(); if (outputSize < workBuffer.length) { byte[] output = new byte[outputSize]; System.arraycopy(workBuffer, 0, output, 0, outputSize); return output; } return workBuffer; }
@Override public byte[] checksum(byte[] data, int start, int len) throws KrbException { int outputSize = outputSize(); HashProvider hp = hashProvider(); hp.hash(data, start, len); byte[] workBuffer = hp.output(); if (outputSize < workBuffer.length) { byte[] output = new byte[outputSize]; System.arraycopy(workBuffer, 0, output, 0, outputSize); return output; } return workBuffer; }