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

39 lines
1.0 KiB
Java

package org.bouncycastle.crypto.tls;
import org.bouncycastle.util.Arrays;
import org.bouncycastle.util.Strings;
/* loaded from: classes6.dex */
public class BasicTlsPSKIdentity implements TlsPSKIdentity {
protected byte[] identity;
protected byte[] psk;
@Override // org.bouncycastle.crypto.tls.TlsPSKIdentity
public void notifyIdentityHint(byte[] bArr) {
}
@Override // org.bouncycastle.crypto.tls.TlsPSKIdentity
public void skipIdentityHint() {
}
@Override // org.bouncycastle.crypto.tls.TlsPSKIdentity
public byte[] getPSKIdentity() {
return this.identity;
}
@Override // org.bouncycastle.crypto.tls.TlsPSKIdentity
public byte[] getPSK() {
return this.psk;
}
public BasicTlsPSKIdentity(byte[] bArr, byte[] bArr2) {
this.identity = Arrays.clone(bArr);
this.psk = Arrays.clone(bArr2);
}
public BasicTlsPSKIdentity(String str, byte[] bArr) {
this.identity = Strings.toUTF8ByteArray(str);
this.psk = Arrays.clone(bArr);
}
}