Updated on 2026-08-14
This commit is contained in:
parent
ee88184e1d
commit
880189ebe0
1 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
package com.tangem.common
|
||||
|
||||
import com.tangem.commands.EllipticCurve
|
||||
import com.tangem.crypto.CryptoUtils.generatePublicKey
|
||||
|
||||
|
||||
/**
|
||||
* Contains data relating to a Tangem card. It is used in constructing all the commands,
|
||||
|
|
@ -27,4 +30,8 @@ enum class EncryptionMode(val code: Byte) {
|
|||
STRONG(0x2)
|
||||
}
|
||||
|
||||
class KeyPair(val publicKey: ByteArray, val privateKey: ByteArray)
|
||||
class KeyPair(val publicKey: ByteArray, val privateKey: ByteArray) {
|
||||
|
||||
constructor(privateKey: ByteArray, curve: EllipticCurve = EllipticCurve.Secp256k1) :
|
||||
this(generatePublicKey(privateKey, curve), privateKey)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue