for (byte b : digest) {
            hash.append(Integer.toHexString((b & 0xFF) | 0x100).toLowerCase().substring(1, 3));
        }