Modify IdenticonBase to use Briar's hashing and to use byte[] instead of String

This commit is contained in:
str4d
2016-01-21 02:36:21 +00:00
parent d645c435fd
commit dfb9222ccd
5 changed files with 51 additions and 17 deletions

View File

@@ -7,6 +7,8 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.Log;
import org.briarproject.api.crypto.CryptoComponent;
/**
* Created by saiimons on 05/10/14.
*/
@@ -15,9 +17,14 @@ public class IdenticonDrawable extends Drawable {
private static final int CENTER_COLUMN_INDEX = 3;
public IdenticonDrawable(String toShow) {
public IdenticonDrawable(final CryptoComponent crypto, byte[] toShow) {
super();
mDelegate = new IdenticonBase() {
@Override
protected CryptoComponent getCrypto() {
return crypto;
}
@Override
protected int getRowCount() {
return 5;