Remove some logging that could result in an information leak.

This commit is contained in:
Moxie Marlinspike 2012-08-05 19:03:14 -07:00
parent e45bc61624
commit dda75006e4

View File

@ -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);
} }