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
Wim Lewis
nettle
Commits
5495424b
Commit
5495424b
authored
Feb 09, 2015
by
Niels Möller
Browse files
Deleted old #if:ed out base64_encode function.
parent
ccc22299
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
5495424b
2015-02-09 Niels Möller <nisse@lysator.liu.se>
* base64-encode.c (base64_encode): Deleted old #if:ed out
function.
* testsuite/base64-test.c (test_fuzz_once, test_fuzz): Additional
tests, based on contribution by Amos Jeffries.
...
...
base64-encode.c
View file @
5495424b
...
...
@@ -87,50 +87,6 @@ base64_encode_raw(uint8_t *dst, size_t length, const uint8_t *src)
assert
(
out
==
dst
);
}
#if 0
unsigned
base64_encode(uint8_t *dst,
unsigned src_length,
const uint8_t *src)
{
unsigned dst_length = BASE64_ENCODE_RAW_LENGTH(src_length);
unsigned n = src_length / 3;
unsigned left_over = src_length % 3;
unsigned done = 0;
if (left_over)
{
const uint8_t *in = src + n * 3;
uint8_t *out = dst + dst_length;
switch(left_over)
{
case 1:
*--out = '=';
*--out = ENCODE(in[0] << 4);
break;
case 2:
*--out = ENCODE( in[1] << 2);
*--out = ENCODE((in[0] << 4) | (in[1] >> 4));
break;
default:
abort();
}
*--out = ENCODE(in[0] >> 2);
done = 4;
}
base64_encode_raw(n, dst, src);
done += n * 4;
assert(done == dst_length);
return done;
}
#endif
void
base64_encode_group
(
uint8_t
*
dst
,
uint32_t
group
)
{
...
...
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