@Override public byte[] toByteArray(){
  byte[] p=priv.toByteArray();
  if (p.length != 32) {
    byte[] tmp=new byte[32];
    System.arraycopy(p,Math.max(0,p.length - 32),tmp,Math.max(0,32 - p.length),Math.min(32,p.length));
    p=tmp;
  }
  return p;
}

@ Override public byte [ ] toByteArray ( ) { byte [ ] p = priv . toByteArray ( ) ; if ( p . length != 32 ) { byte [ ] tmp = new byte [ 32 ] ; System . arraycopy ( p , Math . max ( 0 , p . length - 32 ) , tmp , Math . max ( 0 , 32 - p . length ) , Math . min ( 32 , p . length ) ) ; p = tmp ; } return p ; }
return the private key as a 32byte array aligned to the right .
