Allow WEBIRC from specified hosts

This commit is contained in:
Daniel Oaks
2017-10-15 16:18:14 +10:00
parent 0cc5e68e0f
commit 34987ba53a
7 changed files with 158 additions and 41 deletions

View File

@@ -43,3 +43,8 @@ func DecodePasswordHash(encoded string) (decoded []byte, err error) {
func ComparePassword(hash, password []byte) error {
return bcrypt.CompareHashAndPassword(hash, password)
}
// ComparePasswordString compares a given password string with the given hash.
func ComparePasswordString(hash []byte, password string) error {
return ComparePassword(hash, []byte(password))
}