what-the-bank/sources/org/bouncycastle/crypto/tls/NewSessionTicket.java

34 lines
944 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.crypto.tls;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/* loaded from: classes6.dex */
public class NewSessionTicket {
protected byte[] ticket;
protected long ticketLifetimeHint;
public long getTicketLifetimeHint() {
return this.ticketLifetimeHint;
}
public byte[] getTicket() {
return this.ticket;
}
public void encode(OutputStream outputStream) throws IOException {
TlsUtils.writeUint32(this.ticketLifetimeHint, outputStream);
TlsUtils.writeOpaque16(this.ticket, outputStream);
}
public static NewSessionTicket parse(InputStream inputStream) throws IOException {
return new NewSessionTicket(TlsUtils.readUint32(inputStream), TlsUtils.readOpaque16(inputStream));
}
public NewSessionTicket(long j, byte[] bArr) {
this.ticketLifetimeHint = j;
this.ticket = bArr;
}
}