1 package org.bouncycastle.crypto.params; 2 3 import java.math.BigInteger; 4 5 public class DHPrivateKeyParameters 6 extends DHKeyParameters 7 { 8 private BigInteger x; 9 DHPrivateKeyParameters( BigInteger x, DHParameters params)10 public DHPrivateKeyParameters( 11 BigInteger x, 12 DHParameters params) 13 { 14 super(true, params); 15 16 this.x = x; 17 } 18 getX()19 public BigInteger getX() 20 { 21 return x; 22 } 23 hashCode()24 public int hashCode() 25 { 26 return x.hashCode() ^ super.hashCode(); 27 } 28 equals( Object obj)29 public boolean equals( 30 Object obj) 31 { 32 if (!(obj instanceof DHPrivateKeyParameters)) 33 { 34 return false; 35 } 36 37 DHPrivateKeyParameters other = (DHPrivateKeyParameters)obj; 38 39 return other.getX().equals(this.x) && super.equals(obj); 40 } 41 } 42