scalafmt
parent
477e6b5ff8
commit
cb9dadc092
|
@ -6,7 +6,14 @@ import play.api.i18n.Lang
|
|||
|
||||
import lila.common.Nonce
|
||||
|
||||
case class EmbedConfig(bg: String, board: String, pieceSet: lila.pref.PieceSet, lang: Lang, req: RequestHeader, nonce: Nonce)
|
||||
case class EmbedConfig(
|
||||
bg: String,
|
||||
board: String,
|
||||
pieceSet: lila.pref.PieceSet,
|
||||
lang: Lang,
|
||||
req: RequestHeader,
|
||||
nonce: Nonce
|
||||
)
|
||||
|
||||
object EmbedConfig {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ object AccessToken {
|
|||
|
||||
case class Id(value: String) extends AnyVal
|
||||
object Id {
|
||||
def random() = Id(s"lio_${SecureRandom.nextString(32)}")
|
||||
def random() = Id(s"lio_${SecureRandom.nextString(32)}")
|
||||
def randomPersonal() = Id(SecureRandom.nextString(16)) // TODO: remove
|
||||
}
|
||||
|
||||
|
|
|
@ -38,9 +38,11 @@ case class Team(
|
|||
def publicForum: Boolean = !hideForum.has(true)
|
||||
|
||||
def passwordMatches(pw: String) =
|
||||
password.forall(teamPw => teamPw.size == pw.size && teamPw.zip(pw).foldLeft(0) {
|
||||
case (acc, (a, b)) => acc | (a ^ b) // constant time
|
||||
} == 0)
|
||||
password.forall(teamPw =>
|
||||
teamPw.size == pw.size && teamPw.zip(pw).foldLeft(0) { case (acc, (a, b)) =>
|
||||
acc | (a ^ b) // constant time
|
||||
} == 0
|
||||
)
|
||||
}
|
||||
|
||||
object Team {
|
||||
|
|
Loading…
Reference in New Issue