mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Use i/o stream for serverbug
This commit is contained in:
@@ -117,6 +117,7 @@ import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpApi;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -2086,6 +2087,22 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
static class ByteArrayInOutStream extends ByteArrayOutputStream {
|
||||
public ByteArrayInOutStream() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ByteArrayInOutStream(int size) {
|
||||
super(size);
|
||||
}
|
||||
|
||||
public ByteArrayInputStream getInputStream() {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(this.buf, 0, this.count);
|
||||
this.buf = null;
|
||||
return in;
|
||||
}
|
||||
}
|
||||
|
||||
// Cryptography
|
||||
|
||||
static String sha256(String data) throws NoSuchAlgorithmException {
|
||||
|
||||
Reference in New Issue
Block a user