Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

In Java EC signatures are returned as DER-encoded, RSA signatures however are raw bytearrays

Link copied to clipboard
val r: BigInteger

r - ECDSA signature component

Link copied to clipboard
val s: BigInteger

s - ECDSA signature component

Link copied to clipboard

Signature encoded as per X.509:

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<Asn1Element>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Two signatures are considered equal if r and s are equal. This is true even if they are of definite length, and the lengths differ.

Link copied to clipboard

tries to guess the curve from the bit length of the indefinite-length r/s values this will work well in the vast majority of cases, but may fail in pathological edge cases (when r/s have a very large number of leading zeroes)

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

specifies the curve context for this signature, allowing it to be converted to raw bytes

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

specifies the curve's scalar byte length for this signature, allowing it to be converted to raw bytes