Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions ktor-http/api/ktor-http.api
Original file line number Diff line number Diff line change
Expand Up @@ -1237,18 +1237,23 @@ public final class io/ktor/http/auth/AuthScheme {
public final class io/ktor/http/auth/DigestAlgorithm {
public static final field Companion Lio/ktor/http/auth/DigestAlgorithm$Companion;
public fun <init> (Ljava/lang/String;Ljava/lang/String;Z)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)V
public final fun getHashName ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getUri ()Ljava/lang/String;
public final fun isSession ()Z
}

public final class io/ktor/http/auth/DigestAlgorithm$Companion {
public final fun from (Ljava/lang/String;)Lio/ktor/http/auth/DigestAlgorithm;
public final fun fromUri (Ljava/lang/String;)Lio/ktor/http/auth/DigestAlgorithm;
public final fun getDEFAULT_ALGORITHMS ()Ljava/util/List;
public final fun getMD5 ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getMD5_SESS ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getSHA_256 ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getSHA_256_SESS ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getSHA_384 ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getSHA_512 ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getSHA_512_256 ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getSHA_512_256_SESS ()Lio/ktor/http/auth/DigestAlgorithm;
}
Expand Down Expand Up @@ -1345,6 +1350,57 @@ public final class io/ktor/http/auth/HttpAuthHeaderKt {
public static final fun parseAuthorizationHeaders (Ljava/lang/String;)Ljava/util/List;
}

public final class io/ktor/http/auth/KeyAlgorithm {
public static final field Companion Lio/ktor/http/auth/KeyAlgorithm$Companion;
public static final synthetic fun box-impl (Ljava/lang/String;)Lio/ktor/http/auth/KeyAlgorithm;
public static fun constructor-impl (Ljava/lang/String;)Ljava/lang/String;
public fun equals (Ljava/lang/Object;)Z
public static fun equals-impl (Ljava/lang/String;Ljava/lang/Object;)Z
public static final fun equals-impl0 (Ljava/lang/String;Ljava/lang/String;)Z
public final fun getName ()Ljava/lang/String;
public fun hashCode ()I
public static fun hashCode-impl (Ljava/lang/String;)I
public fun toString ()Ljava/lang/String;
public static fun toString-impl (Ljava/lang/String;)Ljava/lang/String;
public final synthetic fun unbox-impl ()Ljava/lang/String;
}

public final class io/ktor/http/auth/KeyAlgorithm$Companion {
public final fun getEC-GYfFmDM ()Ljava/lang/String;
public final fun getHMAC-GYfFmDM ()Ljava/lang/String;
public final fun getOKP-GYfFmDM ()Ljava/lang/String;
public final fun getRSA-GYfFmDM ()Ljava/lang/String;
}

public final class io/ktor/http/auth/SignatureAlgorithm {
public static final field Companion Lio/ktor/http/auth/SignatureAlgorithm$Companion;
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lio/ktor/http/auth/DigestAlgorithm;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lio/ktor/http/auth/DigestAlgorithm;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getDigestAlgorithm ()Lio/ktor/http/auth/DigestAlgorithm;
public final fun getJcaAlgorithm ()Ljava/lang/String;
public final fun getJwaName ()Ljava/lang/String;
public final fun getKeyAlgorithm-GYfFmDM ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getXmlUri ()Ljava/lang/String;
public fun hashCode ()I
}

public final class io/ktor/http/auth/SignatureAlgorithm$Companion {
public final fun fromJwaName (Ljava/lang/String;)Lio/ktor/http/auth/SignatureAlgorithm;
public final fun fromXmlUri (Ljava/lang/String;)Lio/ktor/http/auth/SignatureAlgorithm;
public final fun getECDSA_SHA_256 ()Lio/ktor/http/auth/SignatureAlgorithm;
public final fun getECDSA_SHA_384 ()Lio/ktor/http/auth/SignatureAlgorithm;
public final fun getECDSA_SHA_512 ()Lio/ktor/http/auth/SignatureAlgorithm;
public final fun getRSA_SHA_256 ()Lio/ktor/http/auth/SignatureAlgorithm;
public final fun getRSA_SHA_384 ()Lio/ktor/http/auth/SignatureAlgorithm;
public final fun getRSA_SHA_512 ()Lio/ktor/http/auth/SignatureAlgorithm;
}

public final class io/ktor/http/auth/SignatureAlgorithm_jvmKt {
public static final fun toJcaSignature (Lio/ktor/http/auth/SignatureAlgorithm;)Ljava/security/Signature;
}

public final class io/ktor/http/content/ByteArrayContent : io/ktor/http/content/OutgoingContent$ByteArrayContent {
public fun <init> ([BLio/ktor/http/ContentType;Lio/ktor/http/HttpStatusCode;)V
public synthetic fun <init> ([BLio/ktor/http/ContentType;Lio/ktor/http/HttpStatusCode;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand Down
68 changes: 68 additions & 0 deletions ktor-http/api/ktor-http.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,16 @@ abstract class io.ktor.http/HeaderValueWithParameters { // io.ktor.http/HeaderVa

final class io.ktor.http.auth/DigestAlgorithm { // io.ktor.http.auth/DigestAlgorithm|null[0]
constructor <init>(kotlin/String, kotlin/String, kotlin/Boolean) // io.ktor.http.auth/DigestAlgorithm.<init>|<init>(kotlin.String;kotlin.String;kotlin.Boolean){}[0]
constructor <init>(kotlin/String, kotlin/String, kotlin/Boolean, kotlin/String?) // io.ktor.http.auth/DigestAlgorithm.<init>|<init>(kotlin.String;kotlin.String;kotlin.Boolean;kotlin.String?){}[0]

final val hashName // io.ktor.http.auth/DigestAlgorithm.hashName|{}hashName[0]
final fun <get-hashName>(): kotlin/String // io.ktor.http.auth/DigestAlgorithm.hashName.<get-hashName>|<get-hashName>(){}[0]
final val isSession // io.ktor.http.auth/DigestAlgorithm.isSession|{}isSession[0]
final fun <get-isSession>(): kotlin/Boolean // io.ktor.http.auth/DigestAlgorithm.isSession.<get-isSession>|<get-isSession>(){}[0]
final val name // io.ktor.http.auth/DigestAlgorithm.name|{}name[0]
final fun <get-name>(): kotlin/String // io.ktor.http.auth/DigestAlgorithm.name.<get-name>|<get-name>(){}[0]
final val uri // io.ktor.http.auth/DigestAlgorithm.uri|{}uri[0]
final fun <get-uri>(): kotlin/String? // io.ktor.http.auth/DigestAlgorithm.uri.<get-uri>|<get-uri>(){}[0]

final object Companion { // io.ktor.http.auth/DigestAlgorithm.Companion|null[0]
final val DEFAULT_ALGORITHMS // io.ktor.http.auth/DigestAlgorithm.Companion.DEFAULT_ALGORITHMS|{}DEFAULT_ALGORITHMS[0]
Expand All @@ -226,12 +229,17 @@ final class io.ktor.http.auth/DigestAlgorithm { // io.ktor.http.auth/DigestAlgor
final fun <get-SHA_256>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_256.<get-SHA_256>|<get-SHA_256>(){}[0]
final val SHA_256_SESS // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_256_SESS|{}SHA_256_SESS[0]
final fun <get-SHA_256_SESS>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_256_SESS.<get-SHA_256_SESS>|<get-SHA_256_SESS>(){}[0]
final val SHA_384 // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_384|{}SHA_384[0]
final fun <get-SHA_384>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_384.<get-SHA_384>|<get-SHA_384>(){}[0]
final val SHA_512 // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_512|{}SHA_512[0]
final fun <get-SHA_512>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_512.<get-SHA_512>|<get-SHA_512>(){}[0]
final val SHA_512_256 // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_512_256|{}SHA_512_256[0]
final fun <get-SHA_512_256>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_512_256.<get-SHA_512_256>|<get-SHA_512_256>(){}[0]
final val SHA_512_256_SESS // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_512_256_SESS|{}SHA_512_256_SESS[0]
final fun <get-SHA_512_256_SESS>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/DigestAlgorithm.Companion.SHA_512_256_SESS.<get-SHA_512_256_SESS>|<get-SHA_512_256_SESS>(){}[0]

final fun from(kotlin/String): io.ktor.http.auth/DigestAlgorithm? // io.ktor.http.auth/DigestAlgorithm.Companion.from|from(kotlin.String){}[0]
final fun fromUri(kotlin/String): io.ktor.http.auth/DigestAlgorithm? // io.ktor.http.auth/DigestAlgorithm.Companion.fromUri|fromUri(kotlin.String){}[0]
}
}

Expand All @@ -253,6 +261,44 @@ final class io.ktor.http.auth/DigestQop { // io.ktor.http.auth/DigestQop|null[0]
}
}

final class io.ktor.http.auth/SignatureAlgorithm { // io.ktor.http.auth/SignatureAlgorithm|null[0]
constructor <init>(kotlin/String, kotlin/String, io.ktor.http.auth/DigestAlgorithm, io.ktor.http.auth/KeyAlgorithm, kotlin/String? = ..., kotlin/String? = ...) // io.ktor.http.auth/SignatureAlgorithm.<init>|<init>(kotlin.String;kotlin.String;io.ktor.http.auth.DigestAlgorithm;io.ktor.http.auth.KeyAlgorithm;kotlin.String?;kotlin.String?){}[0]

final val digestAlgorithm // io.ktor.http.auth/SignatureAlgorithm.digestAlgorithm|{}digestAlgorithm[0]
final fun <get-digestAlgorithm>(): io.ktor.http.auth/DigestAlgorithm // io.ktor.http.auth/SignatureAlgorithm.digestAlgorithm.<get-digestAlgorithm>|<get-digestAlgorithm>(){}[0]
final val jcaAlgorithm // io.ktor.http.auth/SignatureAlgorithm.jcaAlgorithm|{}jcaAlgorithm[0]
final fun <get-jcaAlgorithm>(): kotlin/String // io.ktor.http.auth/SignatureAlgorithm.jcaAlgorithm.<get-jcaAlgorithm>|<get-jcaAlgorithm>(){}[0]
final val jwaName // io.ktor.http.auth/SignatureAlgorithm.jwaName|{}jwaName[0]
final fun <get-jwaName>(): kotlin/String? // io.ktor.http.auth/SignatureAlgorithm.jwaName.<get-jwaName>|<get-jwaName>(){}[0]
final val keyAlgorithm // io.ktor.http.auth/SignatureAlgorithm.keyAlgorithm|{}keyAlgorithm[0]
final fun <get-keyAlgorithm>(): io.ktor.http.auth/KeyAlgorithm // io.ktor.http.auth/SignatureAlgorithm.keyAlgorithm.<get-keyAlgorithm>|<get-keyAlgorithm>(){}[0]
final val name // io.ktor.http.auth/SignatureAlgorithm.name|{}name[0]
final fun <get-name>(): kotlin/String // io.ktor.http.auth/SignatureAlgorithm.name.<get-name>|<get-name>(){}[0]
final val xmlUri // io.ktor.http.auth/SignatureAlgorithm.xmlUri|{}xmlUri[0]
final fun <get-xmlUri>(): kotlin/String? // io.ktor.http.auth/SignatureAlgorithm.xmlUri.<get-xmlUri>|<get-xmlUri>(){}[0]

final fun equals(kotlin/Any?): kotlin/Boolean // io.ktor.http.auth/SignatureAlgorithm.equals|equals(kotlin.Any?){}[0]
final fun hashCode(): kotlin/Int // io.ktor.http.auth/SignatureAlgorithm.hashCode|hashCode(){}[0]

final object Companion { // io.ktor.http.auth/SignatureAlgorithm.Companion|null[0]
final val ECDSA_SHA_256 // io.ktor.http.auth/SignatureAlgorithm.Companion.ECDSA_SHA_256|{}ECDSA_SHA_256[0]
final fun <get-ECDSA_SHA_256>(): io.ktor.http.auth/SignatureAlgorithm // io.ktor.http.auth/SignatureAlgorithm.Companion.ECDSA_SHA_256.<get-ECDSA_SHA_256>|<get-ECDSA_SHA_256>(){}[0]
final val ECDSA_SHA_384 // io.ktor.http.auth/SignatureAlgorithm.Companion.ECDSA_SHA_384|{}ECDSA_SHA_384[0]
final fun <get-ECDSA_SHA_384>(): io.ktor.http.auth/SignatureAlgorithm // io.ktor.http.auth/SignatureAlgorithm.Companion.ECDSA_SHA_384.<get-ECDSA_SHA_384>|<get-ECDSA_SHA_384>(){}[0]
final val ECDSA_SHA_512 // io.ktor.http.auth/SignatureAlgorithm.Companion.ECDSA_SHA_512|{}ECDSA_SHA_512[0]
final fun <get-ECDSA_SHA_512>(): io.ktor.http.auth/SignatureAlgorithm // io.ktor.http.auth/SignatureAlgorithm.Companion.ECDSA_SHA_512.<get-ECDSA_SHA_512>|<get-ECDSA_SHA_512>(){}[0]
final val RSA_SHA_256 // io.ktor.http.auth/SignatureAlgorithm.Companion.RSA_SHA_256|{}RSA_SHA_256[0]
final fun <get-RSA_SHA_256>(): io.ktor.http.auth/SignatureAlgorithm // io.ktor.http.auth/SignatureAlgorithm.Companion.RSA_SHA_256.<get-RSA_SHA_256>|<get-RSA_SHA_256>(){}[0]
final val RSA_SHA_384 // io.ktor.http.auth/SignatureAlgorithm.Companion.RSA_SHA_384|{}RSA_SHA_384[0]
final fun <get-RSA_SHA_384>(): io.ktor.http.auth/SignatureAlgorithm // io.ktor.http.auth/SignatureAlgorithm.Companion.RSA_SHA_384.<get-RSA_SHA_384>|<get-RSA_SHA_384>(){}[0]
final val RSA_SHA_512 // io.ktor.http.auth/SignatureAlgorithm.Companion.RSA_SHA_512|{}RSA_SHA_512[0]
final fun <get-RSA_SHA_512>(): io.ktor.http.auth/SignatureAlgorithm // io.ktor.http.auth/SignatureAlgorithm.Companion.RSA_SHA_512.<get-RSA_SHA_512>|<get-RSA_SHA_512>(){}[0]

final fun fromJwaName(kotlin/String): io.ktor.http.auth/SignatureAlgorithm? // io.ktor.http.auth/SignatureAlgorithm.Companion.fromJwaName|fromJwaName(kotlin.String){}[0]
final fun fromXmlUri(kotlin/String): io.ktor.http.auth/SignatureAlgorithm? // io.ktor.http.auth/SignatureAlgorithm.Companion.fromXmlUri|fromXmlUri(kotlin.String){}[0]
}
}

final class io.ktor.http.content/ByteArrayContent : io.ktor.http.content/OutgoingContent.ByteArrayContent { // io.ktor.http.content/ByteArrayContent|null[0]
constructor <init>(kotlin/ByteArray, io.ktor.http/ContentType? = ..., io.ktor.http/HttpStatusCode? = ...) // io.ktor.http.content/ByteArrayContent.<init>|<init>(kotlin.ByteArray;io.ktor.http.ContentType?;io.ktor.http.HttpStatusCode?){}[0]

Expand Down Expand Up @@ -1263,6 +1309,28 @@ final class io.ktor.http/Url : io.ktor.utils.io/JvmSerializable { // io.ktor.htt
}
}

final value class io.ktor.http.auth/KeyAlgorithm { // io.ktor.http.auth/KeyAlgorithm|null[0]
constructor <init>(kotlin/String) // io.ktor.http.auth/KeyAlgorithm.<init>|<init>(kotlin.String){}[0]

final val name // io.ktor.http.auth/KeyAlgorithm.name|{}name[0]
final fun <get-name>(): kotlin/String // io.ktor.http.auth/KeyAlgorithm.name.<get-name>|<get-name>(){}[0]

final fun equals(kotlin/Any?): kotlin/Boolean // io.ktor.http.auth/KeyAlgorithm.equals|equals(kotlin.Any?){}[0]
final fun hashCode(): kotlin/Int // io.ktor.http.auth/KeyAlgorithm.hashCode|hashCode(){}[0]
final fun toString(): kotlin/String // io.ktor.http.auth/KeyAlgorithm.toString|toString(){}[0]

final object Companion { // io.ktor.http.auth/KeyAlgorithm.Companion|null[0]
final val EC // io.ktor.http.auth/KeyAlgorithm.Companion.EC|{}EC[0]
final fun <get-EC>(): io.ktor.http.auth/KeyAlgorithm // io.ktor.http.auth/KeyAlgorithm.Companion.EC.<get-EC>|<get-EC>(){}[0]
final val HMAC // io.ktor.http.auth/KeyAlgorithm.Companion.HMAC|{}HMAC[0]
final fun <get-HMAC>(): io.ktor.http.auth/KeyAlgorithm // io.ktor.http.auth/KeyAlgorithm.Companion.HMAC.<get-HMAC>|<get-HMAC>(){}[0]
final val OKP // io.ktor.http.auth/KeyAlgorithm.Companion.OKP|{}OKP[0]
final fun <get-OKP>(): io.ktor.http.auth/KeyAlgorithm // io.ktor.http.auth/KeyAlgorithm.Companion.OKP.<get-OKP>|<get-OKP>(){}[0]
final val RSA // io.ktor.http.auth/KeyAlgorithm.Companion.RSA|{}RSA[0]
final fun <get-RSA>(): io.ktor.http.auth/KeyAlgorithm // io.ktor.http.auth/KeyAlgorithm.Companion.RSA.<get-RSA>|<get-RSA>(){}[0]
}
}

sealed class io.ktor.http.auth/HttpAuthHeader { // io.ktor.http.auth/HttpAuthHeader|null[0]
final val authScheme // io.ktor.http.auth/HttpAuthHeader.authScheme|{}authScheme[0]
final fun <get-authScheme>(): kotlin/String // io.ktor.http.auth/HttpAuthHeader.authScheme.<get-authScheme>|<get-authScheme>(){}[0]
Expand Down
47 changes: 44 additions & 3 deletions ktor-http/common/src/io/ktor/http/auth/DigestAlgorithm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package io.ktor.http.auth

/**
* Represents a hash algorithm as defined in RFC 7616.
* Represents a hash algorithm as defined in RFC 7616 and XML Signature.
*
* Each algorithm defines the hash function used for computing digests in HTTP Digest Authentication.
* Session variants (those ending with `-sess`) modify the HA1 calculation to include the nonce and cnonce,
Expand All @@ -18,12 +18,20 @@ package io.ktor.http.auth
* @property name The name of the algorithm as it appears in HTTP headers (e.g., "MD5", "SHA-256-sess")
* @property hashName The Java Security algorithm name used for MessageDigest (e.g., "MD5", "SHA-256")
* @property isSession Whether this is a session variant that incorporates nonce and cnonce into HA1
* @property uri The XML Signature digest algorithm URI, if this algorithm has one
*/
public class DigestAlgorithm(
public val name: String,
public val hashName: String,
public val isSession: Boolean
public val isSession: Boolean,
public val uri: String?,
) {
public constructor(
name: String,
hashName: String,
isSession: Boolean,
) : this(name, hashName, isSession, uri = null)

public companion object {
/** MD5 algorithm - deprecated, use only for backward compatibility with legacy systems */
@Deprecated("MD5 is deprecated because it is not secure")
Expand All @@ -34,11 +42,32 @@ public class DigestAlgorithm(
public val MD5_SESS: DigestAlgorithm = DigestAlgorithm("MD5-sess", "MD5", isSession = true)

/** SHA-256 algorithm - minimum recommended for production use */
public val SHA_256: DigestAlgorithm = DigestAlgorithm("SHA-256", "SHA-256", isSession = false)
public val SHA_256: DigestAlgorithm = DigestAlgorithm(
name = "SHA-256",
hashName = "SHA-256",
isSession = false,
uri = "http://www.w3.org/2001/04/xmlenc#sha256"
)

/** SHA-256 session variant - minimum recommended for production use */
public val SHA_256_SESS: DigestAlgorithm = DigestAlgorithm("SHA-256-sess", "SHA-256", isSession = true)

/** SHA-384 algorithm */
public val SHA_384: DigestAlgorithm = DigestAlgorithm(
name = "SHA-384",
hashName = "SHA-384",
isSession = false,
uri = "http://www.w3.org/2001/04/xmldsig-more#sha384"
)

/** SHA-512 algorithm */
public val SHA_512: DigestAlgorithm = DigestAlgorithm(
name = "SHA-512",
hashName = "SHA-512",
isSession = false,
uri = "http://www.w3.org/2001/04/xmlenc#sha512"
)

/** SHA-512/256 algorithm - **recommended for new implementations**, provides the strongest security */
public val SHA_512_256: DigestAlgorithm = DigestAlgorithm("SHA-512-256", "SHA-512/256", isSession = false)

Expand All @@ -59,6 +88,18 @@ public class DigestAlgorithm(
public fun from(name: String): DigestAlgorithm? {
return DEFAULT_ALGORITHMS.find { it.name.equals(other = name, ignoreCase = true) }
}

/**
* Parses an XML Signature digest algorithm URI into a [DigestAlgorithm].
*
* @param uri The XML Signature digest algorithm URI
* @return The corresponding [DigestAlgorithm] or null if not recognized
*/
public fun fromUri(uri: String): DigestAlgorithm? {
return XML_DIGEST_ALGORITHMS.find { it.uri == uri }
}

private val XML_DIGEST_ALGORITHMS: List<DigestAlgorithm> = listOf(SHA_256, SHA_384, SHA_512)
}
}

Expand Down
29 changes: 29 additions & 0 deletions ktor-http/common/src/io/ktor/http/auth/KeyAlgorithm.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2014-2026 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package io.ktor.http.auth

import kotlin.jvm.JvmInline

/**
* Represents a cryptographic key algorithm family.
*
* @property name The common name of the key algorithm family.
*/
@JvmInline
public value class KeyAlgorithm(public val name: String) {
public companion object {
/** RSA key algorithm family. */
public val RSA: KeyAlgorithm = KeyAlgorithm("RSA")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we've recently added @JvmField annotation to other companion object fields. Should we use it here as well?
cc Bruce Hamilton (@bjhham)


/** Elliptic Curve key algorithm family. */
public val EC: KeyAlgorithm = KeyAlgorithm("EC")

/** HMAC symmetric key algorithm family. */
public val HMAC: KeyAlgorithm = KeyAlgorithm("HMAC")

/** Octet Key Pair key algorithm family. */
public val OKP: KeyAlgorithm = KeyAlgorithm("OKP")
}
}
Loading
Loading