HashesStringHashBytes Method |
This function returns hash of specfied string as byte array
Namespace:
TreeksLicensingLibrary2
Assembly:
TreeksLicensingLibrary2 (in TreeksLicensingLibrary2.dll) Version: 2.1.8318.42066 (2.1.0.0)
Syntax public static byte[] StringHashBytes(
string hash_type,
string text,
string salt = ""
)
Public Shared Function StringHashBytes (
hash_type As String,
text As String,
Optional salt As String = ""
) As Byte()
public:
static array<unsigned char>^ StringHashBytes(
String^ hash_type,
String^ text,
String^ salt = L""
)
static member StringHashBytes :
hash_type : string *
text : string *
?salt : string
(* Defaults:
let _salt = defaultArg salt ""
*)
-> byte[]
Parameters
- hash_type
- Type: SystemString
Hash algorithm to use: md5, sha1, sha256, sha512 - text
- Type: SystemString
String to be hashed - salt (Optional)
- Type: SystemString
Optional salt to be added to hashed text to prevent rainbow attacks
Return Value
Type:
ByteHash result byte array
Remarks This function always uses UTF8 encoding to work with string input
See Also