Skip to content

Commit

Permalink
feat: make PasswordHashingAlgorithm serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
waltkb committed Oct 30, 2024
1 parent 1b9b67e commit 7fdf077
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package id.walt.ktorauthnz.security

import com.password4j.*
import kotlinx.serialization.Serializable
import kotlin.reflect.jvm.jvmName

@Serializable
enum class PasswordHashingAlgorithm(val algorithmInstance: Lazy<AbstractHashingFunction>) {
ARGON2(lazy { AlgorithmFinder.getArgon2Instance() }),
PBKDF2(lazy { AlgorithmFinder.getPBKDF2Instance() }),
Expand Down

0 comments on commit 7fdf077

Please sign in to comment.