SHA1OpenNURBS
SHA1HashAlgorithmProvides 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
Finalizer
~SHA1OpenNURBS
#~SHA1OpenNURBS()
Instructs the runtime to reclaim unmanaged resources if the developer forgot to call Dispose().
Methods
Dispose
#Reclaims unmanaged resources used by this instance, and invalidates the instance. After calling this method, all other methods will always call ObjectDisposedException.
Parameters:
| disposing (bool) | true if the class user called Dispose. |
Overrides: HashAlgorithm.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)
Parameters:
| path (string) | A non-null path string. |
| ignoreCase (bool? = null) | If case should be ignored. If this is null or unspecified, the operating system default is used. |
Returns: A 20-byte long SHA1 hash.
Exceptions:
| ArgumentNullException | When input is null. |
HashCore
#Advances the hash by an input array.
Parameters:
| array (byte[]) | The array. |
| start (int) | The start of the data to consider in the array. |
| length (int) | The used data length on the array. |
Overrides: HashAlgorithm.HashCore
HashFinal
#Returns the currently computed hash.
Returns: The final hash.
Overrides: HashAlgorithm.HashFinal
public override void Initialize()
Resets this instance of the algorithm, so that it can be used again. It is not required to call this method after creation.
Overrides: HashAlgorithm.Initialize
Computes the SHA1 hash of a string, converted to UTF8.
Parameters:
| input (string) |
Returns: A 20-byte long SHA1 hash.
Exceptions:
| ArgumentNullException | When input is null. |