SHA1OpenNURBS

SHA1HashAlgorithm
public sealed class SHA1OpenNURBS : SHA1
Provides the OpenNURBS implementation of SHA1.

This class is provided only with the purpose of hashing. It is not meant to be used for any cryptographic purpose.

Constructors

SHA1OpenNURBS

#Since v6.0
Constructs a new instance of the SHA1 algorithm.
public SHA1OpenNURBS()

Finalizer

~SHA1OpenNURBS

#
Instructs the runtime to reclaim unmanaged resources if the developer forgot to call Dispose().
~SHA1OpenNURBS()

Methods

Dispose

#
Reclaims unmanaged resources used by this instance, and invalidates the instance. After calling this method, all other methods will always call ObjectDisposedException.
protected override void Dispose(
disposing
true if the class user called Dispose.
)

FileSystemPathHash

#
Computes the SHA1 hash of a file system path, converted to UTF8.

These file system paths have identical values of FileSystemPathHash():

/x/y/z/name.ext

\x\y\z\name.ext

/x//y//z/name.ext

/x/y/a/b/c/../../../z/name.ext

/X/Y/Z/NAME.EXT (When ignoreCase is true)

public static byte[] FileSystemPathHash(
path,
A non-null path string.
ignoreCase = null
If case should be ignored. If this is null or unspecified, the operating system default is used.
)
A 20-byte long SHA1 hash.
ArgumentNullExceptionWhen input is null.

HashCore

#
Advances the hash by an input array.
protected override void HashCore(
byte[]
array,
The array.
start,
The start of the data to consider in the array.
length
The used data length on the array.
)

HashFinal

#
Returns the currently computed hash.
protected override byte[] HashFinal()
The final hash.

Initialize

#Since v6.0
Resets this instance of the algorithm, so that it can be used again. It is not required to call this method after creation.
public override void Initialize()

StringHash

#Since v6.0
Computes the SHA1 hash of a string, converted to UTF8.
public static byte[] StringHash(
input
)
A 20-byte long SHA1 hash.
ArgumentNullExceptionWhen input is null.