Created
June 29, 2018 12:32
-
-
Save skenderbeu/a8136acfa0a806021506ff6f38dfd018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private System.Byte[] getSHA1(Str _input) | |
{ | |
System.Security.Cryptography.SHA1Managed sha1Managed; | |
System.Text.Encoding encoding; | |
System.Byte[] bytes; | |
str errorMessage; | |
try | |
{ | |
sha1Managed = new System.Security.Cryptography.SHA1Managed(); | |
encoding = System.Text.Encoding::get_Default(); | |
bytes = sha1Managed.ComputeHash(encoding.GetBytes(_input)); | |
} | |
catch | |
{ | |
errorMessage = AifUtil::getClrErrorMessage(); | |
if(errorMessage) | |
{ | |
throw error (errorMessage); | |
} | |
} | |
return bytes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment