Net Encryption Library
GetStreamAdler32 Method
Example 






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

Parameters

value
Input Stream

Return Value

Adler CRC
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.GetStreamAdler32(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.GetStreamAdler32(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