Security

Control access to your webpages with the AuthorizeAttribute

ASP.NET MVC4 AuthorizeAttribute throughout app

If you’re developing a website where there should only be a couple of publicly accessible pages in ASP.NET MVC, then at first you may try to go through all your controllers decorating them with the AuthorizeAttribute. Although you will still want to allow anonymous users access to the login page otherwise anonymous users can never …

ASP.NET MVC4 AuthorizeAttribute throughout app Read More »

Calculate SHA512 hash of string or file

This class implements the IHasher interface that you can find here. ”’ ”’ SHA512 hash class from Satal Keto’s library ”’ https://samjenkins.com ”’ Version 1.0.0.1 ”’ Imports System.IO Imports System.Security.Cryptography Namespace Security.Hash     Public Class SHA512Hash         Implements IHasher         Public Function hashOfFile(ByVal fileToHash As String) As String Implements IHasher.hashOfFile             Dim rdr As FileStream …

Calculate SHA512 hash of string or file Read More »

Calculate SHA384 hash of string or file

This class implements the IHasher interface that you can find here. ”’ ”’ SHA384 hash class from Satal Keto’s library ”’ https://samjenkins.com ”’ Version 1.0.0.1 ”’ Imports System.IO Imports System.Security.Cryptography Namespace Security.Hash     Public Class SHA384Hash         Implements IHasher         Public Function hashOfFile(ByVal fileToHash As String) As String Implements IHasher.hashOfFile             Dim rdr As FileStream …

Calculate SHA384 hash of string or file Read More »

Calculate SHA256 hash of string or file

This class implements the IHasher interface that you can find here. ”’ ”’ SHA256 hash class from Satal Keto’s library ”’ https://samjenkins.com ”’ Version 1.0.0.1 ”’ Imports System.IO Imports System.Security.Cryptography Namespace Security.Hash     Public Class SHA256Hash         Implements IHasher         Public Function hashOfFile(ByVal fileToHash As String) As String Implements IHasher.hashOfFile             Dim rdr As FileStream …

Calculate SHA256 hash of string or file Read More »

Calculate SHA1 hash of string or file

This class implements the IHasher interface that you can find here. ”’ ”’ SHA1 hash class from Satal Keto’s library ”’ https://samjenkins.com ”’ Version 1.0.0.1 ”’ Imports System.IO Imports System.Security.Cryptography Namespace Security.Hash     Public Class SHA1Hash         Implements IHasher         Public Function hashOfFile(ByVal fileToHash As String) As String Implements IHasher.hashOfFile             Dim rdr As FileStream …

Calculate SHA1 hash of string or file Read More »