Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static byte[] RCon_i(int inp) //количество раундов
- {
- byte[] arr_rci = new byte[inp];
- arr_rci[0] = 0x01;
- for(int i=1;i<inp;i++)
- {
- if(arr_rci[i-1] < 0x80)
- {
- arr_rci[i] = GF_Multp(arr_rci[i - 1], 2);
- }
- else if(arr_rci[i] >= 0x80)
- {
- arr_rci[i] = (byte)(GF_Multp(arr_rci[i - 1], 2) ^ 0x1b);
- }
- }
- return arr_rci;
- }
- static void Main(string[] args)
- {
- byte i = Convert.ToByte(Console.ReadLine());
- byte[] outp = new byte[i];
- outp = RCon_i(i);
- for(int j=0;j<i;j++)
- {
- Console.Write(outp[j] + " ");
- }
- Console.ReadKey();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement