Algorithm

sealed class Algorithm

Represents a cryptographic algorithm supported by a KMS.

This is a sealed class to ensure type safety and allow for future extensions (e.g., algorithm-specific parameters, key sizes, etc.).

Example Usage:

val algorithm = Algorithm.Ed25519
val key = kms.generateKey(algorithm)

// Or parse from string
val algorithm = Algorithm.parse("Ed25519")

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
object Companion
Link copied to clipboard
data class Custom(val customName: String) : Algorithm
Link copied to clipboard
Link copied to clipboard
object P256 : Algorithm
Link copied to clipboard
object P384 : Algorithm
Link copied to clipboard
object P521 : Algorithm
Link copied to clipboard
data class RSA(val rsaKeySize: Int) : Algorithm
Link copied to clipboard
Link copied to clipboard

Security level of this algorithm.

Properties

Link copied to clipboard

Returns the curve name for elliptic curve algorithms, if applicable.

Link copied to clipboard
Link copied to clipboard

Returns the security level of this algorithm.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Checks if this algorithm is compatible with another algorithm.

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