Skip to content
GitLab
Menu
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
58252fce
Commit
58252fce
authored
Sep 01, 2011
by
Niels Möller
Browse files
Document hmac-ripemd160.
Rev: nettle/nettle.texinfo:1.26
parent
e13157a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
nettle.texinfo
View file @
58252fce
...
...
@@ -7,14 +7,14 @@
@syncodeindex fn cp
@c
%**end of header
@set UPDATED-FOR 2.
2
@set UPDATED-FOR 2.
3
@set AUTHOR Niels Möller
@copying
This manual is for the Nettle library (version @value
{
UPDATED-FOR
}
), a
low-level cryptographic library.
Originally written 2001 by @value
{
AUTHOR
}
, updated 201
0
.
Originally written 2001 by @value
{
AUTHOR
}
, updated 201
1
.
@quotation
This manual is placed in the public domain. You may freely copy it, in
...
...
@@ -1829,11 +1829,11 @@ very useful.
Nettle's @acronym
{
HMAC
}
functions are defined in @file
{
<nettle/hmac.h>
}
.
There are abstract functions that use a pointer to a @code
{
struct
nettle
_
hash
}
to represent the underlying hash function and @code
{
void
*
}
pointers that point to three different context structs for that hash
nettle
_
hash
}
to represent the underlying hash function and @code
{
void
*
}
pointers that point to three different context structs for that hash
function. There are also concrete functions for @acronym
{
HMAC-MD5
}
,
@acronym
{
HMAC-SHA1
}
, @acronym
{
HMAC-SHA256
}
, and
@acronym
{
HMAC-SHA512
}
.
First, the abstract functions:
@acronym
{
HMAC-RIPEMD160
}
@acronym
{
HMAC-SHA1
}
, @acronym
{
HMAC-SHA256
}
, and
@acronym
{
HMAC-SHA512
}
.
First, the abstract functions:
@deftypefun void hmac
_
set
_
key (void *@var
{
outer
}
, void *@var
{
inner
}
, void *@var
{
state
}
, const struct nettle
_
hash *@var
{
H
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
key
}
)
Initializes the three context structs from the key. The @var
{
outer
}
and
...
...
@@ -1931,6 +1931,28 @@ This function also resets the context for processing new messages, with
the same key.
@end deftypefun
@subsubsection @acronym
{
HMAC-RIPEMD160
}
@deftp
{
Context struct
}
{
struct hmac
_
ripemd160
_
ctx
}
@end deftp
@deftypefun void hmac
_
ripemd160
_
set
_
key (struct hmac
_
ripemd160
_
ctx *@var
{
ctx
}
, unsigned @var
{
key
_
length
}
, const uint8
_
t *@var
{
key
}
)
Initializes the context with the key.
@end deftypefun
@deftypefun void hmac
_
ripemd160
_
update (struct hmac
_
ripemd160
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
data
}
)
Process some more data.
@end deftypefun
@deftypefun void hmac
_
ripemd160
_
digest (struct hmac
_
ripemd160
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, uint8
_
t *@var
{
digest
}
)
Extracts the @acronym
{
MAC
}
, writing it to @var
{
digest
}
. @var
{
length
}
may be smaller than
@code
{
RIPEMD160
_
DIGEST
_
SIZE
}
, in which case only the first @var
{
length
}
octets of the @acronym
{
MAC
}
are written.
This function also resets the context for processing new messages, with
the same key.
@end deftypefun
@subsubsection @acronym
{
HMAC-SHA1
}
@deftp
{
Context struct
}
{
struct hmac
_
sha1
_
ctx
}
...
...
Write
Preview
Supports
Markdown
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