CryptoPublicKey

Representation of a public key structure

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
@Serializable
@SerialName(value = "EC")
data class EC : CryptoPublicKey

EC public key representation The properties and constructor params are exactly what their names suggest

Link copied to clipboard
data class RSA constructor(val n: Asn1Integer.Positive, val e: Asn1Integer.Positive) : CryptoPublicKey

RSA Public key

Properties

Link copied to clipboard

This is meant for storing additional properties, which may be relevant for certain use cases. For example, Json Web Keys or Cose Keys may define an arbitrary key IDs. This is not meant for Algorithm parameters! If an algorithm needs parameters, the implementing classes should be extended

Link copied to clipboard
abstract val didEncoded: String

Representation of the key in DID format, EC compression is used if key was compressed on reception

Link copied to clipboard
abstract val iosEncoded: ByteArray

Representation of the key in the format used by iOS, EC compression is used if key was compressed on reception

Link copied to clipboard
abstract val oid: ObjectIdentifier

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
Link copied to clipboard
Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Sequence>
Link copied to clipboard

Alias of equals provided for convenience (and alignment with SpecializedCryptoPublicKey)

Whether the actual underlying key (irrespective of any format-specific metadata) is equal

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