what-the-bank/sources/org/bouncycastle/jcajce/io/MacOutputStream.java

29 lines
675 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.jcajce.io;
import java.io.IOException;
import java.io.OutputStream;
import javax.crypto.Mac;
/* loaded from: classes6.dex */
public final class MacOutputStream extends OutputStream {
private Mac mac;
@Override // java.io.OutputStream
public final void write(byte[] bArr, int i, int i2) throws IOException {
this.mac.update(bArr, i, i2);
}
@Override // java.io.OutputStream
public final void write(int i) throws IOException {
this.mac.update((byte) i);
}
public final byte[] getMac() {
return this.mac.doFinal();
}
public MacOutputStream(Mac mac) {
this.mac = mac;
}
}