aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/doc
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-01-14 11:52:07 +0100
committerFredrik Gustafsson <[email protected]>2013-01-14 11:52:07 +0100
commit1066d047e54858cf1a884c7ddbf1af2796c36bd6 (patch)
tree7392de7356e92ae446f75be37642557e9657674b /lib/crypto/doc
parent0a80c6c87042c1ff032b4e1b05bf60e5a8f5d8fa (diff)
parent1afbb47ebc0fbde5547146eb21e072c3bc14a034 (diff)
downloadotp-1066d047e54858cf1a884c7ddbf1af2796c36bd6.tar.gz
otp-1066d047e54858cf1a884c7ddbf1af2796c36bd6.tar.bz2
otp-1066d047e54858cf1a884c7ddbf1af2796c36bd6.zip
Merge branch 'sverk/crypto-hmac-enhancements/OTP-10640'
* sverk/crypto-hmac-enhancements/OTP-10640: crypto: Add RFC-4231 test vectors for output truncation crypto: Add test cases for the generic hmac interface in the RFC-4231 tests crypto: Add RFC-2202 test vectors for HMAC-MD5 and HMAC-SHA1 crypto: Provide a generic interface for HMAC generation crypto: Document all types currently available for hmac_init
Diffstat (limited to 'lib/crypto/doc')
-rwxr-xr-xlib/crypto/doc/src/crypto.xml19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 61e80d7d5f..14c77c873f 100755
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -343,10 +343,27 @@ Mpint() = <![CDATA[<<ByteLen:32/integer-big, Bytes:ByteLen/binary>>]]>
</desc>
</func>
<func>
+ <name>hmac(Type, Key, Data) -> Mac</name>
+ <name>hmac(Type, Key, Data, MacLength) -> Mac</name>
+ <fsummary></fsummary>
+ <type>
+ <v>Type = md5 | sha | sha224 | sha256 | sha384 | sha512</v>
+ <v>Key = iodata()</v>
+ <v>Data = iodata()</v>
+ <v>MacLength = integer()</v>
+ <v>Mac = binary()</v>
+ </type>
+ <desc>
+ <p>Computes a HMAC of type <c>Type</c> from <c>Data</c> using
+ <c>Key</c> as the authentication key.</p> <c>MacLength</c>
+ will limit the size of the resultant <c>Mac</c>.
+ </desc>
+ </func>
+ <func>
<name>hmac_init(Type, Key) -> Context</name>
<fsummary></fsummary>
<type>
- <v>Type = sha | md5 | ripemd160</v>
+ <v>Type = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512</v>
<v>Key = iolist() | binary()</v>
<v>Context = binary()</v>
</type>