mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
use fixed-time comparison of secrets (#1698)
This commit is contained in:
@ -921,5 +921,11 @@ namespace Bit.Core.Utilities
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool FixedTimeEquals(string input1, string input2)
|
||||
{
|
||||
return CryptographicOperations.FixedTimeEquals(
|
||||
Encoding.UTF8.GetBytes(input1), Encoding.UTF8.GetBytes(input2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user