Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
aa4c823b
Commit
aa4c823b
authored
22 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Updated ascii armor declarations. New declaration
for nettle_base16. Rev: src/nettle/nettle-meta.h:1.9
parent
62e431b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nettle-meta.h
+39
-16
39 additions, 16 deletions
nettle-meta.h
with
39 additions
and
16 deletions
nettle-meta.h
+
39
−
16
View file @
aa4c823b
...
...
@@ -160,13 +160,20 @@ extern const struct nettle_hash nettle_sha256;
typedef
unsigned
(
*
nettle_armor_length_func
)(
unsigned
length
);
typedef
void
(
*
nettle_armor_init_func
)(
void
*
ctx
);
typedef
unsigned
(
*
nettle_armor_update_func
)(
void
*
ctx
,
uint8_t
*
dst
,
unsigned
src_length
,
const
uint8_t
*
src
);
typedef
unsigned
(
*
nettle_armor_encode_update_func
)(
void
*
ctx
,
uint8_t
*
dst
,
unsigned
src_length
,
const
uint8_t
*
src
);
typedef
unsigned
(
*
nettle_armor_encode_final_func
)(
void
*
ctx
,
uint8_t
*
dst
);
typedef
int
(
*
nettle_armor_decode_status_func
)(
void
*
ctx
);
typedef
int
(
*
nettle_armor_decode_update_func
)(
void
*
ctx
,
unsigned
*
dst_length
,
uint8_t
*
dst
,
unsigned
src_length
,
const
uint8_t
*
src
);
typedef
int
(
*
nettle_armor_decode_final_func
)(
void
*
ctx
);
struct
nettle_armor
{
...
...
@@ -178,13 +185,13 @@ struct nettle_armor
nettle_armor_init_func
encode_init
;
nettle_armor_length_func
encode_length
;
nettle_armor_update_func
encode_update
;
nettle_armor_
encode_
update_func
encode_update
;
nettle_armor_encode_final_func
encode_final
;
nettle_armor_init_func
decode_init
;
nettle_armor_length_func
decode_length
;
nettle_armor_update_func
decode_update
;
nettle_armor_decode_
status
_func
decode_
status
;
nettle_armor_
decode_
update_func
decode_update
;
nettle_armor_decode_
final
_func
decode_
final
;
};
#define _NETTLE_ARMOR(name, NAME) { \
...
...
@@ -192,17 +199,33 @@ struct nettle_armor
sizeof(struct name##_encode_ctx), \
sizeof(struct name##_decode_ctx), \
NAME##_ENCODE_FINAL_LENGTH, \
(nettle_armor_init_func) name##_encode_init, \
(nettle_armor_length_func) name##_encode_length, \
(nettle_armor_update_func) name##_encode_update, \
(nettle_armor_init_func) name##_encode_init,
\
(nettle_armor_length_func) name##_encode_length,
\
(nettle_armor_
encode_
update_func) name##_encode_update, \
(nettle_armor_encode_final_func) name##_encode_final, \
(nettle_armor_init_func) name##_decode_init, \
(nettle_armor_length_func) name##_decode_length, \
(nettle_armor_update_func) name##_decode_update, \
(nettle_armor_decode_
status
_func) name##_decode_
status,
\
(nettle_armor_init_func) name##_decode_init,
\
(nettle_armor_length_func) name##_decode_length,
\
(nettle_armor_
decode_
update_func) name##_decode_update, \
(nettle_armor_decode_
final
_func) name##_decode_
final,
\
}
#define _NETTLE_ARMOR_0(name, NAME) { \
#name, \
0, \
sizeof(struct name##_decode_ctx), \
NAME##_ENCODE_FINAL_LENGTH, \
(nettle_armor_init_func) name##_encode_init, \
(nettle_armor_length_func) name##_encode_length, \
(nettle_armor_encode_update_func) name##_encode_update, \
(nettle_armor_encode_final_func) name##_encode_final, \
(nettle_armor_init_func) name##_decode_init, \
(nettle_armor_length_func) name##_decode_length, \
(nettle_armor_decode_update_func) name##_decode_update, \
(nettle_armor_decode_final_func) name##_decode_final, \
}
extern
const
struct
nettle_armor
nettle_base64
;
/*
extern const struct nettle_armor nettle_base16;
*/
extern
const
struct
nettle_armor
nettle_base16
;
#endif
/* NETTLE_META_H_INCLUDED */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment