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

36 lines
932 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.jcajce;
import org.bouncycastle.crypto.CharToByteConverter;
/* loaded from: classes6.dex */
public class PBKDF1Key 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 "PBKDF1";
}
public PBKDF1Key(char[] cArr, CharToByteConverter charToByteConverter) {
char[] cArr2 = new char[cArr.length];
this.password = cArr2;
this.converter = charToByteConverter;
System.arraycopy(cArr, 0, cArr2, 0, cArr.length);
}
}