package org.bouncycastle.crypto.tls; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; import org.bouncycastle.util.Arrays; /* loaded from: classes6.dex */ public class ServerSRPParams { protected BigInteger B; protected BigInteger N; protected BigInteger g; protected byte[] s; public byte[] getS() { return this.s; } public BigInteger getN() { return this.N; } public BigInteger getG() { return this.g; } public BigInteger getB() { return this.B; } public void encode(OutputStream outputStream) throws IOException { TlsSRPUtils.writeSRPParameter(this.N, outputStream); TlsSRPUtils.writeSRPParameter(this.g, outputStream); TlsUtils.writeOpaque8(this.s, outputStream); TlsSRPUtils.writeSRPParameter(this.B, outputStream); } public static ServerSRPParams parse(InputStream inputStream) throws IOException { return new ServerSRPParams(TlsSRPUtils.readSRPParameter(inputStream), TlsSRPUtils.readSRPParameter(inputStream), TlsUtils.readOpaque8(inputStream), TlsSRPUtils.readSRPParameter(inputStream)); } public ServerSRPParams(BigInteger bigInteger, BigInteger bigInteger2, byte[] bArr, BigInteger bigInteger3) { this.N = bigInteger; this.g = bigInteger2; this.s = Arrays.clone(bArr); this.B = bigInteger3; } }