Click here to Skip to main content
16,016,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questioncan't build blazor library in azure pipeline Pin
Super Lloyd6-Sep-23 17:08
Super Lloyd6-Sep-23 17:08 
AnswerRe: can't build blazor library in azure pipeline Pin
Super Lloyd6-Sep-23 18:27
Super Lloyd6-Sep-23 18:27 
QuestionBlazor component debugging Pin
Super Lloyd23-Aug-23 14:16
Super Lloyd23-Aug-23 14:16 
AnswerRe: Blazor component debugging Pin
Super Lloyd24-Aug-23 17:27
Super Lloyd24-Aug-23 17:27 
QuestionHTML SELECT CONTROL WITH RUNAT="SERVER Pin
tchia_k30-Jul-23 3:53
professionaltchia_k30-Jul-23 3:53 
AnswerRe: HTML SELECT CONTROL WITH RUNAT="SERVER Pin
Richard Deeming30-Jul-23 22:14
mveRichard Deeming30-Jul-23 22:14 
Question"Context.UserIdentifier" of SignalR is always null when I use CustomAuthenticationStateProvider in Blazor Server App Pin
Alex Wright 202221-Jul-23 3:45
Alex Wright 202221-Jul-23 3:45 
SuggestionRe: "Context.UserIdentifier" of SignalR is always null when I use CustomAuthenticationStateProvider in Blazor Server App Pin
Richard Deeming23-Jul-23 23:17
mveRichard Deeming23-Jul-23 23:17 
Quote:
C#
private bool MatchPasswordHash(string passwordText, byte[] password, byte[] passwordKey)
{
    using (var hmac = new HMACSHA512(passwordKey))
    {
        var passwordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(passwordText));
        for (int i = 0; i < passwordHash.Length; i++)
        {
            if (passwordHash[i] != password[i])
            {
                return false;
            }
        }
        return true;
    }
}
Not an answer to your question, but that code is potentially vulnerable to a timing attack[^].

Although the salt may render it harder for an attacker to exploit, it would be better to avoid the early return - you always want this function to compare the full length of the arrays, not just the first n bytes.
C#
bool areEqual = true;
for (int i = 0; i < passwordHash.Length; i++)
{
    if (passwordHash[i] != password[i])
    {
        areEqual = false;
    }
}

return areEqual;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

QuestionIs is possible to import an excel file with hyperlinks? Pin
samflex16-Jul-23 17:25
samflex16-Jul-23 17:25 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
Richard MacCutchan16-Jul-23 21:45
mveRichard MacCutchan16-Jul-23 21:45 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
samflex17-Jul-23 5:26
samflex17-Jul-23 5:26 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
Richard MacCutchan17-Jul-23 5:29
mveRichard MacCutchan17-Jul-23 5:29 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
samflex18-Jul-23 3:43
samflex18-Jul-23 3:43 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
Richard MacCutchan18-Jul-23 4:40
mveRichard MacCutchan18-Jul-23 4:40 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
RedDk18-Jul-23 7:19
RedDk18-Jul-23 7:19 
AnswerRe: Is is possible to import an excel file with hyperlinks? Pin
Andre Oosthuizen16-Jul-23 23:59
mveAndre Oosthuizen16-Jul-23 23:59 
AnswerRe: Is is possible to import an excel file with hyperlinks? Pin
Richard Andrew x6424-Jul-23 3:19
professionalRichard Andrew x6424-Jul-23 3:19 
GeneralRe: Is is possible to import an excel file with hyperlinks? Pin
samflex24-Jul-23 6:34
samflex24-Jul-23 6:34 
QuestionIllustrating ad emails Pin
Ali Al Omairi(Abu AlHassan)10-Jul-23 2:35
professionalAli Al Omairi(Abu AlHassan)10-Jul-23 2:35 
QuestionAdvise on how to reuse code behind in asp.net VB pages Pin
Member 875830229-Jun-23 16:25
Member 875830229-Jun-23 16:25 
AnswerRe: Advise on how to reuse code behind in asp.net VB pages Pin
Andre Oosthuizen3-Jul-23 0:49
mveAndre Oosthuizen3-Jul-23 0:49 
GeneralRe: Advise on how to reuse code behind in asp.net VB pages Pin
Member 87583024-Jul-23 3:04
Member 87583024-Jul-23 3:04 
GeneralRe: Advise on how to reuse code behind in asp.net VB pages Pin
Andre Oosthuizen4-Jul-23 3:40
mveAndre Oosthuizen4-Jul-23 3:40 
AnswerRe: Advise on how to reuse code behind in asp.net VB pages Pin
Gerry Schmitz3-Jul-23 4:54
mveGerry Schmitz3-Jul-23 4:54 
GeneralRe: Advise on how to reuse code behind in asp.net VB pages Pin
Member 87583024-Jul-23 3:07
Member 87583024-Jul-23 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.