Here you can find the source of getBytesWithoutSign(BigInteger arg)
private static byte[] getBytesWithoutSign(BigInteger arg)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; public class Main { private static byte[] getBytesWithoutSign(BigInteger arg) { byte[] sourceArray = arg.toByteArray(); if (sourceArray[0] != 0) { return sourceArray; } else {//from w w w .j a v a 2s.c o m byte[] withoutSign = new byte[sourceArray.length - 1]; System.arraycopy(sourceArray, 1, withoutSign, 0, withoutSign.length); return withoutSign; } } }