public Hash(byte[] hash){
  if (hash.length != 32) {
    throw new IllegalArgumentException("Digest length must be 32 bytes for Hash");
  }
  this.bytes=new byte[32];
  System.arraycopy(hash,0,this.bytes,0,32);
}

public Hash ( byte [ ] hash ) { if ( hash . length != 32 ) { throw new IllegalArgumentException ( "Digest length must be 32 bytes for Hash" ) ; } this . bytes = new byte [ 32 ] ; System . arraycopy ( hash , 0 , this . bytes , 0 , 32 ) ; }
create a hash from a digest
