43 lines
1.1 KiB
Java
43 lines
1.1 KiB
Java
|
package org.bouncycastle.crypto.digests;
|
||
|
|
||
|
import java.io.ByteArrayOutputStream;
|
||
|
import org.bouncycastle.crypto.Digest;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class NullDigest implements Digest {
|
||
|
private ByteArrayOutputStream bOut = new ByteArrayOutputStream();
|
||
|
|
||
|
@Override // org.bouncycastle.crypto.Digest
|
||
|
public void update(byte[] bArr, int i, int i2) {
|
||
|
this.bOut.write(bArr, i, i2);
|
||
|
}
|
||
|
|
||
|
@Override // org.bouncycastle.crypto.Digest
|
||
|
public void update(byte b) {
|
||
|
this.bOut.write(b);
|
||
|
}
|
||
|
|
||
|
@Override // org.bouncycastle.crypto.Digest
|
||
|
public void reset() {
|
||
|
this.bOut.reset();
|
||
|
}
|
||
|
|
||
|
@Override // org.bouncycastle.crypto.Digest
|
||
|
public int getDigestSize() {
|
||
|
return this.bOut.size();
|
||
|
}
|
||
|
|
||
|
@Override // org.bouncycastle.crypto.Digest
|
||
|
public String getAlgorithmName() {
|
||
|
return "NULL";
|
||
|
}
|
||
|
|
||
|
@Override // org.bouncycastle.crypto.Digest
|
||
|
public int doFinal(byte[] bArr, int i) {
|
||
|
byte[] byteArray = this.bOut.toByteArray();
|
||
|
System.arraycopy(byteArray, 0, bArr, i, byteArray.length);
|
||
|
reset();
|
||
|
return byteArray.length;
|
||
|
}
|
||
|
}
|