if(reverse ? cbytes[0] == 0 : cbytes.length > outSize) {
if(cbytes[0] != 0) throw new RuntimeException("should never happen");
byte[] buf = new byte[cbytes.length-1];
- System.arraycopy(cbytes,1,buf,0,outSize);
+ System.arraycopy(cbytes,1,buf,0,buf.length);
return buf;
} else if(!reverse && cbytes.length < outSize) {
// output needs to be exactly outSize in length