Net Encryption Library
HashStringBase64(HashProvider,String) Method
Example 






KellermanSoftware.NetEncryptionLibrary Namespace > Encryption Class > HashStringBase64 Method : HashStringBase64(HashProvider,String) Method
The hash algorithm to use
The string to hash
Return a Base64 encoded one way hash of a string
Syntax
'Declaration
 
Public Overloads Function HashStringBase64( _
   ByVal hashType As HashProvider, _
   ByVal input As System.String _
) As System.String
'Usage
 
Dim instance As Encryption
Dim hashType As HashProvider
Dim input As System.String
Dim value As System.String
 
value = instance.HashStringBase64(hashType, input)
public System.string HashStringBase64( 
   HashProvider hashType,
   System.string input
)
public function HashStringBase64( 
    hashType: HashProvider;
    input: System.String
): System.String; 
public function HashStringBase64( 
   hashType : HashProvider,
   input : System.String
) : System.String;
public: System.string* HashStringBase64( 
   HashProvider hashType,
   System.string* input
) 
public:
System.String^ HashStringBase64( 
   HashProvider hashType,
   System.String^ input
) 

Parameters

hashType
The hash algorithm to use
input
The string to hash

Return Value

Hashed string OR string.empty on error
Example
Encryption encryption = new Encryption(); //Trial Mode
//Encryption encryption = new Encryption("place user name here", "place license key here"); //License Mode
 
string input = "test";
 
string results = encryption.HashStringBase64(HashProvider.SHA512, input);
Console.WriteLine(results);
Dim encryption As New Encryption() 'Trial Mode
'Dim encryption As New Encryption("place user name here", "place license key here") 'License Mode
 
Dim input As String = "test"
 
Dim results As String = encryption.HashStringBase64(HashProvider.SHA512, input)
Console.WriteLine(results)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Encryption Class
Encryption Members
Overload List