Net Encryption Library
GetStreamCRC32 Method
Example 






KellermanSoftware.NetEncryptionLibrary Namespace > Encryption Class : GetStreamCRC32 Method
Get a 32 bit Cyclic Redundency Check for a stream
Syntax
'Declaration
 
Public Function GetStreamCRC32( _
   ByVal stream As System.IO.Stream _
) As System.Long
'Usage
 
Dim instance As Encryption
Dim stream As System.IO.Stream
Dim value As System.Long
 
value = instance.GetStreamCRC32(stream)
public System.long GetStreamCRC32( 
   System.IO.Stream stream
)
public function GetStreamCRC32( 
    stream: System.IO.Stream
): System.Int64; 
public function GetStreamCRC32( 
   stream : System.IO.Stream
) : System.long;
public: System.long GetStreamCRC32( 
   System.IO.Stream* stream
) 
public:
System.int64 GetStreamCRC32( 
   System.IO.Stream^ stream
) 

Parameters

stream
Example
Encryption encryption = new Encryption(); //Trial Mode
//Encryption encryption = new Encryption("place user name here", "place license key here"); //License Mode
 
File.WriteAllText("input.txt", "This is a test");
 
long results;
 
using (FileStream stream = new FileStream("input.txt", FileMode.Open, FileAccess.Read))
    results = encryption.GetStreamCRC32(stream);
 
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("input.txt", "This is a test")
 
Dim results As Long
 
Using stream As New FileStream("input.txt", FileMode.Open, FileAccess.Read)
    results = encryption.GetStreamCRC32(stream)
End Using
 
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