The .NET Encryption Library supports EncodeBase32, EncodeBase58NoChecksum, EncodeBase58WithChecksum, EncodeBase64, uuEncode for turning bytes into strings. There are corresponding methods for turning strings back into bytes: DecodeBase32, DecodeBase58NoChecksum, DecodeBase58WithChecksum, DecodeBase64 and uuDecode.
C# | Copy Code |
---|---|
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 base58 = encryption.EncodeBase58WithChecksum(bytes); byte[] decodedBytes = encryption.DecodeBase58WithChecksum(base58); Console.WriteLine(base58); |
VB.NET | Copy Code |
---|---|
Dim encryption As New Encryption() 'Trial Mode 'Encryption encryption = 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 base58 As String = encryption.EncodeBase58WithChecksum(bytes) Dim decodedBytes() As Byte = encryption.DecodeBase58WithChecksum(base58) Console.WriteLine(base58) |