Skip to content

Scala library providing a simple interface to bcrypt with minimal dependencies. Supports scala2 and scala3

License

Notifications You must be signed in to change notification settings

mbryzek/lib-cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lib-cipher

Simple access to hash and verify values with bcrypt

Example

    val cipher = com.mbryzek.cipher.Ciphers().latest
    val enc = cipher.hash("plaintext")
    println(
      s"Encrypted hash, base 64 encoded is: ${enc.hash}. Config rounds[${enc.rounds}], timeMs[${enc.timeToHashMs}]"
    )
    if (cipher.isValid(plaintext = "test", hash = enc.hash, salt = enc.salt)) {
      println("Plaintext matches hash")
    } else {
      println("Plaintext does not match hash")
    }

About

Scala library providing a simple interface to bcrypt with minimal dependencies. Supports scala2 and scala3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages