mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07:30 +00:00
Remove some logging that could result in an information leak.
This commit is contained in:
parent
e45bc61624
commit
dda75006e4
@ -16,14 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
package org.thoughtcrime.securesms.protocol;
|
package org.thoughtcrime.securesms.protocol;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.util.Base64;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.util.Base64;
|
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates prefixes that identify a message as
|
* Calculates prefixes that identify a message as
|
||||||
* being part of an encrypted session. The idea was to
|
* being part of an encrypted session. The idea was to
|
||||||
@ -64,15 +62,10 @@ public abstract class WirePrefix {
|
|||||||
String prefix = message.substring(0, PREFIX_SIZE);
|
String prefix = message.substring(0, PREFIX_SIZE);
|
||||||
message = message.substring(PREFIX_SIZE);
|
message = message.substring(PREFIX_SIZE);
|
||||||
|
|
||||||
Log.w("Prefix", "Calculating on message: " + message + "**");
|
|
||||||
|
|
||||||
String calculatedPrefix = calculatePrefix((prefixType + message).getBytes(), PREFIX_BYTES);
|
String calculatedPrefix = calculatePrefix((prefixType + message).getBytes(), PREFIX_BYTES);
|
||||||
|
|
||||||
assert(calculatedPrefix.length() == PREFIX_SIZE);
|
assert(calculatedPrefix.length() == PREFIX_SIZE);
|
||||||
|
|
||||||
Log.w("Prefix", "Received prefix: " + prefix);
|
|
||||||
Log.w("Prefix", "Calculated prefix: " + calculatedPrefix);
|
|
||||||
|
|
||||||
return prefix.equals(calculatedPrefix);
|
return prefix.equals(calculatedPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user