Skip to content

Commit

Permalink
Fix typos in deprecation messages that temporarily confused me
Browse files Browse the repository at this point in the history
  • Loading branch information
henricook committed Aug 13, 2020
1 parent 7d496e9 commit d453ce5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/scala/com/github/t3hnar/bcrypt/package.scala
Expand Up @@ -25,7 +25,7 @@ package object bcrypt {
// I suggest adding an explicit 1, or updating the documentation.
private[this] def doBcrypt: String = B.hashpw(pswrd, BCrypt.gensalt())

@deprecated("Use boundedBcrypt(rounds: Int) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
@deprecated("Use bcryptBounded(rounds: Int) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
def bcrypt(rounds: Int): String = doBcrypt(rounds)

def bcryptBounded(rounds: Int): String = {
Expand All @@ -40,7 +40,7 @@ package object bcrypt {

private[this] def doBcrypt(rounds: Int): String = B.hashpw(pswrd, BCrypt.gensalt(rounds))

@deprecated("Use boundedBcrypt(salt: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
@deprecated("Use bcryptBounded(salt: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
def bcrypt(salt: String): String = doBcrypt(salt)

def bcryptBounded(salt: String): String = {
Expand All @@ -50,7 +50,7 @@ package object bcrypt {

private[this] def doBcrypt(salt: String): String = B.hashpw(pswrd, salt)

@deprecated("Use isBoundedBcrypted(hash: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
@deprecated("Use isBcryptedBounded(hash: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
def isBcrypted(hash: String): Boolean = doIsBcrypted(hash)

def isBcryptedBounded(hash: String): Boolean = {
Expand All @@ -60,23 +60,23 @@ package object bcrypt {

private[this] def doIsBcrypted(hash: String): Boolean = B.checkpw(pswrd, hash)

@deprecated("Use boundedBcryptSafe(rounds: Int) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
@deprecated("Use bcryptSafeBounded(rounds: Int) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
def bcryptSafe(rounds: Int): Try[String] = Try(doBcrypt(rounds))

def bcryptSafeBounded(rounds: Int): Try[String] = {
if(moreThanLength()) Failure(illegalArgumentException)
else Try(doBcrypt(rounds))
}

@deprecated("Use boundedBcryptSafe(salt: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
@deprecated("Use bcryptSafeBounded(salt: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
def bcryptSafe(salt: String): Try[String] = Try(doBcrypt(salt))

def bcryptSafeBounded(salt: String): Try[String] = {
if(moreThanLength()) Failure(illegalArgumentException)
else Try(doBcrypt(salt))
}

@deprecated("Use isBoundedBcryptedSafe(hash: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
@deprecated("Use isBcryptedSafeBounded(hash: String) instead.\nMore information at https://github.com/t3hnar/scala-bcrypt/issues/23", "4.3.0")
def isBcryptedSafe(hash: String): Try[Boolean] = Try(doIsBcrypted(hash))

def isBcryptedSafeBounded(hash: String): Try[Boolean] = {
Expand Down

0 comments on commit d453ce5

Please sign in to comment.