what-the-bank/sources/org/bouncycastle/jcajce/PBKDF2Key.java

35 lines
878 B
Java

package org.bouncycastle.jcajce;
import org.bouncycastle.crypto.CharToByteConverter;
import org.bouncycastle.util.Arrays;
/* loaded from: classes6.dex */
public class PBKDF2Key implements PBKDFKey {
private final CharToByteConverter converter;
private final char[] password;
public char[] getPassword() {
return this.password;
}
@Override // java.security.Key
public String getFormat() {
return this.converter.getType();
}
@Override // java.security.Key
public byte[] getEncoded() {
return this.converter.convert(this.password);
}
@Override // java.security.Key
public String getAlgorithm() {
return "PBKDF2";
}
public PBKDF2Key(char[] cArr, CharToByteConverter charToByteConverter) {
this.password = Arrays.clone(cArr);
this.converter = charToByteConverter;
}
}