Here you can find the source of checksumLength(int algorithmCode, int dataLength)
public static int checksumLength(int algorithmCode, int dataLength)
//package com.java2s; //License from project: Apache License public class Main { public final static int NO_CHECKSUM = 0; private final static int CHECK_CHUNK_SIZE = 512; public static int checksumLength(int algorithmCode, int dataLength) { if (algorithmCode == NO_CHECKSUM) { return 0; } else {//from w ww. j a v a 2s . c om return (int) Math.ceil((double) dataLength / CHECK_CHUNK_SIZE) * 8; } } }