From df2db9049582623ef4d4c80b76e163f3bb045971 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 5 Jun 2019 10:02:06 +1000 Subject: [PATCH] Fix private key serialization --- src/org/thoughtcrime/securesms/loki/KeyPairActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/loki/KeyPairActivity.kt b/src/org/thoughtcrime/securesms/loki/KeyPairActivity.kt index e87f1a30f5..bbcd24ca26 100644 --- a/src/org/thoughtcrime/securesms/loki/KeyPairActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/KeyPairActivity.kt @@ -7,6 +7,7 @@ import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.crypto.IdentityKeyUtil import org.whispersystems.libsignal.IdentityKeyPair import org.whispersystems.signalservice.loki.crypto.MnemonicCodec +import org.whispersystems.signalservice.loki.utilities.hexEncodedPrivateKey import java.io.File import java.io.FileOutputStream @@ -56,8 +57,7 @@ class KeyPairActivity : BaseActionBarActivity() { } private fun updateMnemonic() { - val hexEncodedPrivateKey = ("67982927" + "aaaabbbb" + "8926bfgd" + "0bfbba33" + "67982927" + "aaaabbbb" + "8926bfgd" + "0bfbba33").toUpperCase() // Hex.toString(keyPair!!.privateKey.serialize()) - mnemonic = MnemonicCodec(languageFileDirectory).encode(hexEncodedPrivateKey) + mnemonic = MnemonicCodec(languageFileDirectory).encode(keyPair!!.hexEncodedPrivateKey) } private fun updateMnemonicTextView() {