Code example for BigInteger

Methods: hashCode

0
        return x;
    } 
 
    public int hashCode() 
    { 
        return x.hashCode() ^ super.hashCode();
    } 
     
    public boolean equals( 
        Object  obj)
    { 
        if (!(obj instanceof DHPrivateKeyParameters))
        { 
            return false; 
        } 
 
        DHPrivateKeyParameters  other = (DHPrivateKeyParameters)obj;
 
        return other.getX().equals(this.x) && super.equals(obj);
    } 
}