Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
3ead2b97
Commit
3ead2b97
authored
Sep 10, 2012
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
desdata.c: Include stdio.h.
parent
916d3bb1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
ChangeLog
ChangeLog
+3
-0
desdata.c
desdata.c
+13
-13
No files found.
ChangeLog
View file @
3ead2b97
2012-09-10 Niels Möller <nisse@lysator.liu.se>
* desdata.c: Don't declare printf, include <stdio.h> instead. Also
deleted casts of printf return value.
From Tim Rühsen:
* examples/nettle-benchmark.c (die): Use PRINTF_STYLE attribute.
* pgp-encode.c (pgp_put_rsa_sha1_signature): Deleted unused variable.
...
...
desdata.c
View file @
3ead2b97
...
...
@@ -15,6 +15,8 @@
# include "config.h"
#endif
#include <stdio.h>
#include "desinfo.h"
#include "desCode.h"
...
...
@@ -62,8 +64,6 @@ int sorder[] = {
7
,
5
,
3
,
1
,
6
,
4
,
2
,
0
,
};
int
printf
(
const
char
*
,
...);
int
main
(
int
argc
UNUSED
,
char
**
argv
UNUSED
)
{
...
...
@@ -77,7 +77,7 @@ main(int argc UNUSED, char **argv UNUSED)
*/
case
'p'
:
(
void
)
printf
(
printf
(
"/* automagically produced - do not fuss with this information */
\n\n
"
);
/* store parity information */
...
...
@@ -99,9 +99,9 @@ case 'p':
/* print it out */
for
(
i
=
0
;
i
<
256
;
i
++
)
{
(
void
)
printf
(
"%d,"
,
b
[
i
]);
printf
(
"%d,"
,
b
[
i
]);
if
(
(
i
&
31
)
==
31
)
(
void
)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
break
;
...
...
@@ -112,7 +112,7 @@ case 'p':
*/
case
'r'
:
(
void
)
printf
(
"/* automagically made - do not fuss with this */
\n\n
"
);
printf
(
"/* automagically made - do not fuss with this */
\n\n
"
);
/* KL specifies the initial key bit positions */
for
(
i
=
0
;
i
<
56
;
i
++
)
...
...
@@ -136,11 +136,11 @@ case 'r':
m
=
ksr
[
KC
[
korder
[
j
]]
-
1
];
m
=
(
m
/
8
)
*
7
+
(
m
%
8
)
-
1
;
m
=
55
-
m
;
(
void
)
printf
(
" %2ld,"
,
(
long
)
m
);
printf
(
" %2ld,"
,
(
long
)
m
);
if
((
j
%
12
)
==
11
)
(
void
)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
(
void
)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
break
;
...
...
@@ -151,7 +151,7 @@ case 'r':
*/
case
'k'
:
(
void
)
printf
(
"/* automagically made - do not fuss with this */
\n\n
"
);
printf
(
"/* automagically made - do not fuss with this */
\n\n
"
);
for
(
i
=
0
;
i
<=
7
;
i
++
)
{
s
=
sorder
[
i
];
...
...
@@ -183,11 +183,11 @@ case 'k':
/* rotate right (alg keeps everything rotated by 1) */
ROR
(
m
,
1
,
31
);
/* print it out */
(
void
)
printf
(
" 0x%08lx,"
,
(
long
)
m
);
printf
(
" 0x%08lx,"
,
(
long
)
m
);
if
(
(
d
&
3
)
==
3
)
(
void
)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
(
void
)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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