PandA-2024.02
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Functions
+
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
y
z
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
+
Enumerations
a
b
c
d
f
g
i
m
n
o
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
+
Related Functions
a
b
c
e
f
h
i
l
o
p
r
s
t
u
v
w
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
q
r
s
t
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Enumerations
a
b
c
d
e
f
h
i
k
l
m
o
p
r
s
t
u
v
+
Enumerator
a
b
c
d
e
f
g
i
k
l
n
o
p
r
s
t
u
v
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
examples
MachSuite
MachSuite
aes
aes
generate.c
Go to the documentation of this file.
1
#include <stdlib.h>
2
#include <stdio.h>
3
#include <string.h>
4
#include <sys/types.h>
5
#include <sys/stat.h>
6
#include <fcntl.h>
7
#include <unistd.h>
8
#include <assert.h>
9
10
#include "
aes.h
"
11
12
int
main
(
int
argc,
char
**argv) {
13
struct
bench_args_t
data;
14
uint8_t initial_contents[16] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
15
int
i, fd;
16
17
// Fill data structure
18
for
(i=0; i<32; i++)
19
data.
k
[i] = i;
20
memcpy(data.
buf
, initial_contents, 16);
21
22
// Open and write
23
fd = open(
"input.data"
, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
24
assert( fd>0 &&
"Couldn't open input data file"
);
25
data_to_input
(fd, &data);
26
27
return
0;
28
}
data_to_input
void data_to_input(int fd, void *vdata)
Definition:
local_support.c:34
bench_args_t::buf
uint8_t buf[16]
Definition:
aes.h:21
main
int main(int argc, char **argv)
Definition:
generate.c:12
aes.h
bench_args_t::k
uint8_t k[32]
Definition:
aes.h:20
bench_args_t
Definition:
aes.h:18
Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by
1.8.13