Editare

Partajați prin


Hash.CreateSHA1(Byte[]) Method

Definition

Creates a Hash object that contains a SHA1 hash value.

public:
 static System::Security::Policy::Hash ^ CreateSHA1(cli::array <System::Byte> ^ sha1);
public static System.Security.Policy.Hash CreateSHA1 (byte[] sha1);
static member CreateSHA1 : byte[] -> System.Security.Policy.Hash
Public Shared Function CreateSHA1 (sha1 As Byte()) As Hash

Parameters

sha1
Byte[]

A byte array that contains a SHA1 hash value.

Returns

An object that contains the hash value provided by the sha1 parameter.

Exceptions

The sha1 parameter is null.

Remarks

The returned Hash object contains only the SHA1 property.

Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.

Applies to