Net Encryption Library
HashFileBase64(HashProvider,String) Method
Example 






KellermanSoftware.NetEncryptionLibrary Namespace > Encryption Class > HashFileBase64 Method : HashFileBase64(HashProvider,String) Method
The hash algorithm to use
The file to hash
Hash a file using the specified hash provider
Syntax
'Declaration
 
Public Overloads Function HashFileBase64( _
   ByVal hashType As HashProvider, _
   ByVal inputFilePath As System.String _
) As System.String
'Usage
 
Dim instance As Encryption
Dim hashType As HashProvider
Dim inputFilePath As System.String
Dim value As System.String
 
value = instance.HashFileBase64(hashType, inputFilePath)
public System.string HashFileBase64( 
   HashProvider hashType,
   System.string inputFilePath
)
public function HashFileBase64( 
    hashType: HashProvider;
    inputFilePath: System.String
): System.String; 
public function HashFileBase64( 
   hashType : HashProvider,
   inputFilePath : System.String
) : System.String;
public: System.string* HashFileBase64( 
   HashProvider hashType,
   System.string* inputFilePath
) 
public:
System.String^ HashFileBase64( 
   HashProvider hashType,
   System.String^ inputFilePath
) 

Parameters

hashType
The hash algorithm to use
inputFilePath
The file to hash

Return Value

Base64 Encoded Hash
Example
Encryption encryption = new Encryption(); //Trial Mode
//Encryption encryption = new Encryption("place user name here", "place license key here"); //License Mode
 
File.WriteAllText("test.txt", "This is a test");
 
string results = encryption.HashFileBase64(HashProvider.SHA512, "test.txt");
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
 
File.WriteAllText("test.txt", "This is a test")
 
Dim results As String = encryption.HashFileBase64(HashProvider.SHA512, "test.txt")
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