Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
e518d716
Commit
e518d716
authored
Nov 22, 1998
by
Niels Möller
Browse files
Use the UINT* types.
Rev: src/symmetric/desTest.c:1.2
parent
3f90ab36
Changes
1
Hide whitespace changes
Inline
Side-by-side
desTest.c
View file @
e518d716
...
...
@@ -34,27 +34,27 @@ static struct rusage usage;
* the tests (key0-3, text0-3) are cribbed from code which is (c) 1988 MIT
*/
byte
keyt
[
8
]
=
{
0x5d
,
0x85
,
0x91
,
0x73
,
0xcb
,
0x49
,
0xdf
,
0x2f
};
byte
key0
[
8
]
=
{
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x80
};
byte
key1
[
8
]
=
{
0x80
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
};
byte
key2
[
8
]
=
{
0x08
,
0x19
,
0x2a
,
0x3b
,
0x4c
,
0x5d
,
0x6e
,
0x7f
};
byte
key3
[
8
]
=
{
0x01
,
0x23
,
0x45
,
0x67
,
0x89
,
0xab
,
0xcd
,
0xef
};
byte
textt
[
8
]
=
{
0x67
,
0x1f
,
0xc8
,
0x93
,
0x46
,
0x5e
,
0xab
,
0x1e
};
byte
text0
[
8
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
byte
text1
[
8
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
};
byte
text2
[
8
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
byte
text3
[
8
]
=
{
'N'
,
'o'
,
'w'
,
' '
,
'i'
,
's'
,
' '
,
't'
};
UINT8
keyt
[
8
]
=
{
0x5d
,
0x85
,
0x91
,
0x73
,
0xcb
,
0x49
,
0xdf
,
0x2f
};
UINT8
key0
[
8
]
=
{
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x80
};
UINT8
key1
[
8
]
=
{
0x80
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
};
UINT8
key2
[
8
]
=
{
0x08
,
0x19
,
0x2a
,
0x3b
,
0x4c
,
0x5d
,
0x6e
,
0x7f
};
UINT8
key3
[
8
]
=
{
0x01
,
0x23
,
0x45
,
0x67
,
0x89
,
0xab
,
0xcd
,
0xef
};
UINT8
textt
[
8
]
=
{
0x67
,
0x1f
,
0xc8
,
0x93
,
0x46
,
0x5e
,
0xab
,
0x1e
};
UINT8
text0
[
8
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
UINT8
text1
[
8
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
};
UINT8
text2
[
8
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
UINT8
text3
[
8
]
=
{
'N'
,
'o'
,
'w'
,
' '
,
'i'
,
's'
,
' '
,
't'
};
/* work areas */
DesKeys
keys
;
byte
cipher
[
8
],
output
[
8
];
UINT8
cipher
[
8
],
output
[
8
];
/* noisy interfaces to the routines under test */
static
void
method
(
key
)
byte
*
key
;
UINT8
*
key
;
{
int
j
;
...
...
@@ -68,7 +68,7 @@ byte *key;
static
void
encode
(
src
,
dst
)
byte
*
src
,
*
dst
;
UINT8
*
src
,
*
dst
;
{
int
j
;
...
...
@@ -86,7 +86,7 @@ byte *src, *dst;
static
void
decode
(
src
,
dst
,
check
)
byte
*
src
,
*
dst
,
*
check
;
UINT8
*
src
,
*
dst
,
*
check
;
{
int
j
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment