EC

@Serializable
@SerialName(value = "EC")
data class EC : CryptoPublicKey(source)

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

Parameters

preferCompressedRepresentation

indicates whether to use point compression where applicable

Types

Link copied to clipboard

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
Link copied to clipboard
open override val didEncoded: String

Returns did:key:$MULTIBASE_ENCODING_IDENTIFIER$MULTICODEC_ALGORITHM_IDENTIFIER$BYTES with all bytes after MULTIBASE_ENCODING_IDENTIFIER in the assigned encoding Multicodec identifiers '0x120x' are draft identifiers for P-xxx keys with point compression

Link copied to clipboard
open override 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
open override val oid: ObjectIdentifier
Link copied to clipboard
Link copied to clipboard
val x: ModularBigInteger
Link copied to clipboard
Link copied to clipboard
val y: ModularBigInteger
Link copied to clipboard
Link copied to clipboard
val yCompressed: Sign

Functions

Link copied to clipboard

Convenience function to directly get the DER-encoded representation of the implementing object

Link copied to clipboard

Exception-free version of encodeToDer

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

Safe version of encodeToDer, wrapping the result into a KmmResult

Link copied to clipboard
open override fun encodeToTlv(): Asn1Sequence

Encodes the implementing object into an A

Link copied to clipboard

Exception-free version of encodeToTlv

Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Sequence>

Safe version of encodeToTlv, wrapping the result into a KmmResult

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
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
open override fun hashCode(): Int
Link copied to clipboard
fun toAnsiX963Encoded(useCompressed: Boolean = preferCompressedRepresentation): ByteArray

ANSI X9.63 Encoding as used by iOS