Moves the ContactList cache lists to AccountViewModel, where it can be disposed more efficiently.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
package com.vitorpamplona.quartz.crypto
|
||||
|
||||
import com.vitorpamplona.quartz.encoders.HexKey
|
||||
import com.vitorpamplona.quartz.encoders.toHexKey
|
||||
|
||||
class KeyPair(
|
||||
@@ -29,6 +30,7 @@ class KeyPair(
|
||||
) {
|
||||
val privKey: ByteArray?
|
||||
val pubKey: ByteArray
|
||||
val pubKeyHex: HexKey
|
||||
|
||||
init {
|
||||
if (privKey == null) {
|
||||
@@ -52,6 +54,8 @@ class KeyPair(
|
||||
this.pubKey = pubKey
|
||||
}
|
||||
}
|
||||
|
||||
this.pubKeyHex = this.pubKey.toHexKey().intern()
|
||||
}
|
||||
|
||||
override fun toString(): String = "KeyPair(privateKey=${privKey?.toHexKey()}, publicKey=${pubKey.toHexKey()}"
|
||||
|
||||
Reference in New Issue
Block a user