mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-22 00:59:57 +01:00
Update message hash
This commit is contained in:
@@ -52,6 +52,7 @@ import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@@ -1182,6 +1183,15 @@ public class MessageHelper {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
String getHash() throws MessagingException {
|
||||
try {
|
||||
return Helper.sha1(getHeaders().getBytes());
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static String formatAddresses(Address[] addresses) {
|
||||
return formatAddresses(addresses, true, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user