frank
Basic Auth.
timing-attack
equals(byte [] a, byte [] a2)
public fun authenticate(credential: UserPasswordCredential): UserIdPrincipal? { val userPasswordHash = table[credential.name] if (userPasswordHash != null && digester(credential.password) contentEquals userPasswordHash) { return UserIdPrincipal(credential.name) } return null }
Ktor lib
Arjan van Wieringen
chiroptical
contentEquals
if
@IntrinsicCandidate public static boolean equals(byte[] a, byte[] a2) { if (a==a2) return true; if (a==null || a2==null) return false; int length = a.length; if (a2.length != length) return false; return ArraysSupport.mismatch(a, a2, length) < 0; }
A modern programming language that makes developers happier.