Example #1
0
 public static ByteArray BT1Pad(ByteArray data, int lenght)
 {
     if (data.Size > (lenght - 3))
     {
         throw new Exception("Dati da paddare troppo lunghi");
     }
     return(new ByteArray(new byte[] { 0, 1 }).Append(ByteArray.Fill(lenght - data.Size - 3, 0xff)).Append(0).Append(data));
 }