EC

sealed class EC : CryptoPrivateKey.Impl

SEC1 Elliptic Curve Private Key Structure as per RFC 5915 augmented with optional attributes. Attributes are never SEC1 encoded, but are relevant when PKCS#8-encoding a private key.

Inheritors

Types

Link copied to clipboard
object Companion : PemDecodable<Asn1Sequence, CryptoPrivateKey.EC>
Link copied to clipboard
object FromSEC1 : Asn1Decodable<Asn1Sequence, CryptoPrivateKey.EC>
Link copied to clipboard
class WithoutPublicKey(val privateKey: BigInteger, val publicKeyBytes: Asn1BitString?, val attributes: List<Asn1Element>? = null, curveOrderLengthInBytes: Int) : CryptoPrivateKey.EC
Link copied to clipboard
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

Properties

Link copied to clipboard
open val asPKCS8: PemEncodable<Asn1Sequence>

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

Link copied to clipboard
val asSEC1: PemEncodable<Asn1Sequence>

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
open override val oid: ObjectIdentifier
Link copied to clipboard
val privateKey: BigInteger
Link copied to clipboard

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
open fun encodeToTlvOrNull(): Asn1Sequence?
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
Link copied to clipboard
open infix fun withImplicitTag(tag: Asn1Element.Tag): Asn1Element
open infix fun withImplicitTag(template: Asn1Element.Tag.Template): Asn1Element
open infix fun withImplicitTag(tagValue: ULong): Asn1Element