what-the-bank/sources/org/bouncycastle/crypto/params/MQVPublicParameters.java

32 lines
1.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.crypto.params;
import org.bouncycastle.crypto.CipherParameters;
/* loaded from: classes6.dex */
public class MQVPublicParameters implements CipherParameters {
private ECPublicKeyParameters ephemeralPublicKey;
private ECPublicKeyParameters staticPublicKey;
public ECPublicKeyParameters getStaticPublicKey() {
return this.staticPublicKey;
}
public ECPublicKeyParameters getEphemeralPublicKey() {
return this.ephemeralPublicKey;
}
public MQVPublicParameters(ECPublicKeyParameters eCPublicKeyParameters, ECPublicKeyParameters eCPublicKeyParameters2) {
if (eCPublicKeyParameters == null) {
throw new NullPointerException("staticPublicKey cannot be null");
}
if (eCPublicKeyParameters2 == null) {
throw new NullPointerException("ephemeralPublicKey cannot be null");
}
if (!eCPublicKeyParameters.getParameters().equals(eCPublicKeyParameters2.getParameters())) {
throw new IllegalArgumentException("Static and ephemeral public keys have different domain parameters");
}
this.staticPublicKey = eCPublicKeyParameters;
this.ephemeralPublicKey = eCPublicKeyParameters2;
}
}