Export (0) Print
Expand All

Crypto Class

Provides methods to generate hash values and encrypt passwords or other sensitive data.

System.Object
  System.Web.Helpers.Crypto

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

public static class Crypto

The Crypto type exposes the following members.

  NameDescription
Public methodStatic memberGenerateSaltGenerates a cryptographically strong sequence of random byte values.
Public methodStatic memberHash(Byte[], String)Returns a hash value for the specified byte array.
Public methodStatic memberHash(String, String)Returns a hash value for the specified string.
Public methodStatic memberHashPasswordReturns an RFC 2898 hash value for the specified password.
Public methodStatic memberSHA1Returns a SHA-1 hash value for the specified string.
Public methodStatic memberSHA256Returns a SHA-256 hash value for the specified string.
Public methodStatic memberVerifyHashedPasswordDetermines whether the specified RFC 2898 hash and password are a cryptographic match.
Top

This class represents a helper, which is a component that simplifies web programming in ASP.NET Web Pages. You can use the Crypto class to encrypt passwords and other sensitive data in order to prevent the data from being read if an unauthorized party gains access to the data.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft