This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// Inserts an element. Returns the number of new elements. | |
int insert(int arr[], int len, int num, int key) | |
{ | |
int i; | |
if (len == key) | |
{ | |
arr[key] = num; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package encryption | |
import ( | |
"fmt" | |
"math" | |
) | |
// Rijndael S-box as a 256-byte array | |
var sBox = [256]byte{ | |
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, |