WithPublicKey

class WithPublicKey constructor(    val privateKey: BigInteger,     val publicKey: CryptoPublicKey.EC,     val encodeCurve: Boolean,     val encodePublicKey: Boolean,     val attributes: List<Asn1Element>? = null) : CryptoPrivateKey.EC, CryptoPrivateKey.WithPublicKey<CryptoPublicKey.EC> , KeyAgreementPrivateValue.ECDH(source)

Throws

in case invalid parameters are provided

Constructors

Link copied to clipboard
constructor(privateKey: BigInteger, curve: ECCurve, encodeCurve: Boolean, encodePublicKey: Boolean, attributes: List<Asn1Element>? = null)
constructor(    privateKey: BigInteger,     publicKey: CryptoPublicKey.EC,     encodeCurve: Boolean,     encodePublicKey: Boolean,     attributes: List<Asn1Element>? = null)

Properties

Link copied to clipboard

Encodes this private key into a PKCS#8-encoded private key. This is the default.

Link copied to clipboard

Encodes this private key into a SEC1-encoded private key

Link copied to clipboard
open override val attributes: List<Asn1Element>?

optional attributes relevant when PKCS#8-encoding a private key

Link copied to clipboard
open override val canonicalPEMBoundary: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val oid: ObjectIdentifier
Link copied to clipboard
val privateKey: BigInteger
Link copied to clipboard
open override val privateKeyBytes: ByteArray
Link copied to clipboard
open override val publicKey: CryptoPublicKey.EC

CryptoPublicKey matching this private key.

Link copied to clipboard
open override val publicValue: CryptoPublicKey.EC

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeToDerSafe(): KmmResult<ByteArray>
Link copied to clipboard
open override fun encodeToTlv(): Asn1Sequence

PKCS#8 encoding of a private key:

Link copied to clipboard
Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Sequence>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun CryptoPrivateKey.EC.WithPublicKey.toJcaPrivateKey(): KmmResult<<Error class: unknown class>>
fun CryptoPrivateKey.WithPublicKey<*>.toJcaPrivateKey(): KmmResult<<Error class: unknown class>>
Link copied to clipboard
fun CryptoPrivateKey.WithPublicKey<*>.toSecKey(): KmmResult<OwnedCFValue<SecKeyRef>>

Converts this privateKey into a SecKeyRef, making it usable on iOS

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open infix fun withImplicitTag(tagValue: ULong): Asn1Element