Creates a way to ask for donations in the Notification page.

This commit is contained in:
Vitor Pamplona
2024-02-19 18:56:08 -05:00
parent 2514b74883
commit 1b93fc57cb
11 changed files with 552 additions and 11 deletions
@@ -25,6 +25,7 @@ import com.vitorpamplona.quartz.encoders.toHexKey
class KeyPair(
privKey: ByteArray? = null,
pubKey: ByteArray? = null,
forcePubKeyCheck: Boolean = true,
) {
val privKey: ByteArray?
val pubKey: ByteArray
@@ -44,7 +45,12 @@ class KeyPair(
} else {
// as private key is provided, ignore the public key and set keys according to private key
this.privKey = privKey
this.pubKey = CryptoUtils.pubkeyCreate(privKey)
if (pubKey == null || forcePubKeyCheck) {
this.pubKey = CryptoUtils.pubkeyCreate(privKey)
} else {
this.pubKey = pubKey
}
}
}