Net Encryption Library
DecodeBase64 Method
Example 






KellermanSoftware.NetEncryptionLibrary Namespace > Encryption Class : DecodeBase64 Method
The string to decode
Decode a string that is Base64 encoded
Syntax
'Declaration
 
Public Function DecodeBase64( _
   ByVal input As System.String _
) As System.Byte()
'Usage
 
Dim instance As Encryption
Dim input As System.String
Dim value() As System.Byte
 
value = instance.DecodeBase64(input)
public System.byte[] DecodeBase64( 
   System.string input
)
public function DecodeBase64( 
    input: System.String
): System.array of Byte; 
public function DecodeBase64( 
   input : System.String
) : System.byte[];
public: System.byte[]* DecodeBase64( 
   System.string* input
) 
public:
System.array<byte>^ DecodeBase64( 
   System.String^ input
) 

Parameters

input
The string to decode

Return Value

The decoded bytes OR null on error
Example
Encryption encryption = new Encryption(); //Trial Mode
//Encryption encryption = new Encryption("place user name here", "place license key here"); //License Mode
 
byte[] bytes = new byte[255];
 
for (int i = 0; i < 255; i++)
    bytes[i] = (byte)i;
 
string base64String = encryption.EncodeBase64(bytes);
 
Console.WriteLine(base64String);
 
byte[] decodedBytes = encryption.DecodeBase64(base64String);
Dim encryption As New Encryption() 'Trial Mode
'Dim encryption As New Encryption("place user name here", "place license key here") 'License Mode
 
Dim bytes(254) As Byte
 
For i As Integer = 0 To 254
    bytes(i) = CByte(i)
Next i
 
Dim base64String As String = encryption.EncodeBase64(bytes)
 
Console.WriteLine(base64String)
 
Dim decodedBytes() As Byte = encryption.DecodeBase64(base64String)
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