L
Lloyd Dupont
I would like to (if possible) shuffle my licence key data with a public key
encryption algorithm.
Basically I wonder if it's possible to use buffer of 8 bytes long for my
data.
I did a quick test with RSA (below) but it (apparently) used 128 bytes long
buffer.
Any tips?
----- T.cs -----
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.IO;
using System.Text;
using System.Security.Cryptography;
// csc /nologo T.cs && t
class RSACSPSample
{
static void Main()
{
byte[] data = new byte[] { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
byte[] crypted = rsa.Encrypt(data, false);
byte[] decrypt = rsa.Decrypt(crypted, false);
Console.WriteLine("Crypted length "+crypted.Length);
Console.WriteLine("Decrypted length "+decrypt.Length);
foreach(byte b in decrypt)
Console.Write("{0} ", b);
Console.WriteLine();
}
}
encryption algorithm.
Basically I wonder if it's possible to use buffer of 8 bytes long for my
data.
I did a quick test with RSA (below) but it (apparently) used 128 bytes long
buffer.
Any tips?
----- T.cs -----
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.IO;
using System.Text;
using System.Security.Cryptography;
// csc /nologo T.cs && t
class RSACSPSample
{
static void Main()
{
byte[] data = new byte[] { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
byte[] crypted = rsa.Encrypt(data, false);
byte[] decrypt = rsa.Decrypt(crypted, false);
Console.WriteLine("Crypted length "+crypted.Length);
Console.WriteLine("Decrypted length "+decrypt.Length);
foreach(byte b in decrypt)
Console.Write("{0} ", b);
Console.WriteLine();
}
}