RSA

@Serializable
data class RSA : CryptoPublicKey(source)

RSA Public key

Constructors

Link copied to clipboard
constructor(n: ByteArray, e: Int)

Types

Link copied to clipboard
Link copied to clipboard

enum of supported RSA key sized. For sanity checks!

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. The Multicodec identifier for RSA is 0x1205 and the key bytes are represented as PKCS#1 encoding.

Link copied to clipboard
val e: Int

public exponent

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
@Serializable(with = ByteArrayBase64Serializer::class)
val n: ByteArray

modulus

Link copied to clipboard
open override val oid: ObjectIdentifier
Link copied to clipboard

PKCS#1 encoded RSA Public Key

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
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
open infix fun withImplicitTag(tagValue: ULong): Asn1Element