summaryrefslogtreecommitdiff
path: root/lib/crypto/doc/src
diff options
context:
space:
mode:
authorHans Nilsson <hans@erlang.org>2020-12-09 14:38:35 +0100
committerHans Nilsson <hans@erlang.org>2020-12-11 15:04:47 +0100
commit5da026bf8567dce80483f15c090c9ee60366c8ba (patch)
tree4eb639f57c301a99f7c1b224b6380f86d83ee194 /lib/crypto/doc/src
parent165c1e100fc5b8231cc45591509859838815a879 (diff)
downloaderlang-5da026bf8567dce80483f15c090c9ee60366c8ba.tar.gz
crypto: Remove the old API from doc
Diffstat (limited to 'lib/crypto/doc/src')
-rw-r--r--lib/crypto/doc/src/crypto.xml430
-rw-r--r--lib/crypto/doc/src/new_api.xml48
2 files changed, 50 insertions, 428 deletions
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index e0b190a508..b2e145840b 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -190,7 +190,7 @@
</description>
<datatypes>
- <datatype_title>Ciphers, new API</datatype_title>
+ <datatype_title>Ciphers</datatype_title>
<datatype>
<name name="cipher"/>
<desc>
@@ -209,8 +209,7 @@
<datatype>
<name name="cipher_aead"/>
<desc>
- <p>Ciphers known by the CRYPTO application when using the
- <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.</p>
+ <p>Ciphers known by the CRYPTO application.</p>
<p>Note that this list might be reduced if the underlying libcrypto does not support all of them.</p>
</desc>
</datatype>
@@ -219,8 +218,7 @@
<name name="crypto_opts"/>
<name name="crypto_opt"/>
<desc>
- <p>Selects encryption (<c>{encrypt,true}</c>) or decryption (<c>{encrypt,false}</c>)
- in the <seeguide marker="crypto:new_api#the-new-api"><i>New API</i></seeguide>.
+ <p>Selects encryption (<c>{encrypt,true}</c>) or decryption (<c>{encrypt,false}</c>).
</p>
</desc>
</datatype>
@@ -251,79 +249,6 @@
</desc>
</datatype>
- <datatype_title>Ciphers, old API</datatype_title>
- <datatype>
- <name name="block_cipher_with_iv"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="block_cipher_without_iv"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="stream_cipher"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="aead_cipher"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="cbc_cipher"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="cfb_cipher"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="ctr_cipher"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="ecb_cipher"/>
- <desc>
- <p>Ciphers known by the CRYPTO application when using the
- <seeguide marker="crypto:new_api#the-old-api">old API</seeguide>.</p>
- <p>Note that this list might be reduced if the underlying libcrypto does not support all of them.</p>
- </desc>
- </datatype>
-
- <datatype>
- <name name="retired_cbc_cipher_aliases"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="retired_cfb_cipher_aliases"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="retired_ctr_cipher_aliases"/>
- <desc>
- </desc>
- </datatype>
- <datatype>
- <name name="retired_ecb_cipher_aliases"/>
- <desc>
- <p>Alternative, old names of ciphers known by the CRYPTO application when using the
- <seeguide marker="crypto:new_api#the-old-api">old API</seeguide>.
- See <seeguide marker="crypto:new_api#retired-cipher-names">Retired cipher names</seeguide> for names to
- use instead to be prepared for an easy convertion to the
- <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
- </p>
- <p>Note that this list might be reduced if the underlying libcrypto does not support all of them.</p>
- </desc>
- </datatype>
-
<datatype_title>Digests and hash</datatype_title>
<datatype>
<name name="hash_algorithm"/>
@@ -407,17 +332,6 @@
<datatype_title>Keys</datatype_title>
<datatype>
- <name name="key"/>
- <name name="des3_key"/>
- <desc>
- <p>For keylengths, iv-sizes and blocksizes see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- <p>A key for des3 is a list of three iolists</p>
- </desc>
- </datatype>
-
- <datatype>
<name name="key_integer"/>
<desc>
<p>Always <c>binary()</c> when used as return value</p>
@@ -621,9 +535,7 @@
<datatype>
<name name="crypto_state"/>
<name name="hash_state"/>
- <name name="hmac_state"/>
<name name="mac_state"/>
- <name name="stream_state"/>
<desc>
<p>Contexts with an internal state that should not be manipulated but passed between function calls.
</p>
@@ -641,7 +553,7 @@
<p>The exception <c>error:notsup</c> signifies that the algorithm is known but is not supported
by current underlying libcrypto or explicitly disabled when building that.
</p>
- <p>For a list of supported algorithms, see <seemfa marker="#supports/0">supports/0</seemfa>.
+ <p>For a list of supported algorithms, see <seemfa marker="#supports/1">supports(ciphers)</seemfa>.
</p>
</desc>
</datatype>
@@ -701,15 +613,10 @@
<funcs>
- <fsdescription>
- <title>New API</title>
- </fsdescription>
<func>
<name name="crypto_init" arity="3" since="OTP 22.0"/>
<fsummary>Initializes a series of encryptions or decryptions</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
- </p>
<p>Equivalent to the call
<seemfa marker="#crypto_init/4"><c>crypto_init(Cipher, Key, &lt;&lt;>>, FlagOrOptions)</c></seemfa>.
It is intended for ciphers without an IV (nounce).
@@ -721,7 +628,7 @@
<name name="crypto_init" arity="4" since="OTP 22.0"/>
<fsummary>Initializes a series of encryptions or decryptions</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
+ <p>
Initializes a series of encryptions or decryptions and creates an internal state
with a reference that is returned.
</p>
@@ -777,7 +684,7 @@
<name name="crypto_update" arity="2" since="OTP 22.0"/>
<fsummary>Do an actual crypto operation on a part of the full text</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
+ <p>
It does an actual crypto operation on a part of the full text. If the part is less
than a number of full blocks, only the full blocks (possibly none) are encrypted
or decrypted and the remaining bytes are saved to the next <c>crypto_update</c> operation.
@@ -796,8 +703,6 @@
<name name="crypto_dyn_iv_init" arity="3" since="OTP 22.0"/>
<fsummary>Initializes a series of encryptions or decryptions where the IV is provided later</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
- </p>
<p>Initializes a series of encryptions or decryptions where the IV is provided later.
The actual encryption or decryption is done by
<seemfa marker="crypto#crypto_dyn_iv_update/3">crypto_dyn_iv_update/3</seemfa>.
@@ -812,8 +717,6 @@
<name name="crypto_final" arity="1" since=""/>
<fsummary>Ends a series of encryptions or decryptions</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
- </p>
<p>
Finalizes a series of encryptions or decryptions and delivers the final bytes of the final block.
The data returned from this function may be empty if no padding was enabled in
@@ -827,8 +730,6 @@
<name name="crypto_get_data" arity="1" since=""/>
<fsummary>Get information about crypto states</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
- </p>
<p>
Returns information about the State in the argument. The information is the form of a map,
which currently contains at least:
@@ -857,7 +758,7 @@
<name name="crypto_dyn_iv_update" arity="3" since="OTP 22.0"/>
<fsummary>Do an actual crypto operation on a part of the full text and the IV is supplied for each part</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
+ <p>
Do an actual crypto operation on a part of the full text and the IV is supplied for each part.
The <c>State</c> should be created with
<seemfa marker="crypto#crypto_dyn_iv_init/3">crypto_dyn_iv_init/3</seemfa>.
@@ -877,7 +778,7 @@
<name name="crypto_one_time" arity="5" since="OTP 22.0"/>
<fsummary>Do a complete encrypt or decrypt of the full text</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
+ <p>
Do a complete encrypt or decrypt of the full text in the argument <c>Data</c>.
</p>
<p>For encryption, set the <c>FlagOrOptions</c> to <c>true</c>. For decryption, set it to <c>false</c>.
@@ -894,7 +795,7 @@
<name name="crypto_one_time_aead" arity="7" since="OTP 22.0"/>
<fsummary>Do a complete encrypt or decrypt with an AEAD cipher of the full text</fsummary>
<desc>
- <p>Part of the <seeguide marker="crypto:new_api#the-new-api">new API</seeguide>.
+ <p>
Do a complete encrypt or decrypt with an AEAD cipher of the full text.
</p>
<p>For encryption, set the <c>EncryptFlag</c> to <c>true</c> and set the <c>TagOrTagLength</c>
@@ -909,6 +810,21 @@
</desc>
</func>
+ <!--func>
+ <name name="supports" arity="0" since="OTP R16B01"/>
+ <fsummary>Provide a list of available crypto algorithms.</fsummary>
+ <desc>
+ <dont><p>Don't use this function for new programs! Use
+ <seemfa marker="crypto#supports/1">supports/1</seemfa> in
+ <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
+ <p> Can be used to determine which crypto algorithms that are supported
+ by the underlying libcrypto library</p>
+ <p>See <seemfa marker="#hash_info/1">hash_info/1</seemfa> and <seemfa marker="#cipher_info/1">cipher_info/1</seemfa>
+ for information about the hash and cipher algorithms.
+ </p>
+ </desc>
+ </func-->
+
<func>
<name name="supports" arity="1" since="OTP 22.0"/>
<fsummary>Provide a list of available crypto algorithms.</fsummary>
@@ -1102,14 +1018,7 @@
</p>
</desc>
</func>
- </funcs>
-
-
- <funcs>
- <fsdescription>
- <title>API kept from previous versions</title>
- </fsdescription>
<func>
<name name="bytes_to_integer" arity="1" since="OTP R16B01"/>
<fsummary>Convert binary representation, of an integer, to an Erlang integer.</fsummary>
@@ -1221,7 +1130,7 @@
<warning>
<p>In FIPS mode all non-FIPS compliant algorithms are
disabled and raise exception <c>error:notsup</c>. Check
- <seemfa marker="#supports/0">supports</seemfa> that in
+ <seemfa marker="#supports/1">supports(ciphers)</seemfa> that in
FIPS mode returns the restricted list of available
algorithms.</p>
</warning>
@@ -1271,7 +1180,7 @@
<p>Provides a map with information about block_size, size and possibly other properties of the
hash algorithm in question.
</p>
- <p>For a list of supported hash algorithms, see <seemfa marker="#supports/0">supports/0</seemfa>.
+ <p>For a list of supported hash algorithms, see <seemfa marker="#supports/1">supports(hashs)</seemfa>.
</p>
</desc>
</func>
@@ -1292,7 +1201,7 @@
<p>Always use a <c>Type</c> with an explicit key length,
</p>
</note>
- <p>For a list of supported cipher algorithms, see <seemfa marker="#supports/0">supports/0</seemfa>.
+ <p>For a list of supported cipher algorithms, see <seemfa marker="#supports/1">supports(ciphers)</seemfa>.
</p>
</desc>
</func>
@@ -1306,19 +1215,6 @@
</func>
<func>
- <name name="next_iv" arity="2" since="OTP R16B01"/>
- <name name="next_iv" arity="3" since="OTP R16B01"/>
- <fsummary></fsummary>
- <desc>
- <p>Returns the initialization vector to be used in the next
- iteration of encrypt/decrypt of type <c>Type</c>. <c>Data</c> is the
- encrypted data from the previous iteration step. The <c>IVec</c>
- argument is only needed for <c>des_cfb</c> as the vector used
- in the previous iteration step.</p>
- </desc>
- </func>
-
- <func>
<name name="private_decrypt" arity="4" since="OTP R16B01"/>
<fsummary>Decrypts CipherText using the private Key.</fsummary>
<desc>
@@ -2044,276 +1940,4 @@ FloatValue = rand:uniform(). % again
</funcs>
-
- <funcs>
- <fsdescription>
- <title>Old API</title>
- </fsdescription>
- <func>
- <name name="block_encrypt" arity="3" since="OTP 18.0"/>
- <fsummary>Encrypt <c>PlainText</c> according to <c>Type</c> block cipher</fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the-new-api</seeguide>.</p></dont>
- <p>Encrypt <c>PlainText</c> according to <c>Type</c> block cipher.</p>
- <p>May raise exception <c>error:notsup</c> in case the chosen <c>Type</c>
- is not supported by the underlying libcrypto implementation.</p>
- <p>For keylengths and blocksizes see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- </desc>
- </func>
-
- <func>
- <name name="block_decrypt" arity="3" since="OTP 18.0"/>
- <fsummary>Decrypt <c>CipherText</c> according to <c>Type</c> block cipher</fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Decrypt <c>CipherText</c> according to <c>Type</c> block cipher.</p>
- <p>May raise exception <c>error:notsup</c> in case the chosen <c>Type</c>
- is not supported by the underlying libcrypto implementation.</p>
- <p>For keylengths and blocksizes see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- </desc>
- </func>
-
- <func>
- <name since="OTP R16B01">block_encrypt(Type, Key, Ivec, PlainText) -> CipherText | Error</name>
- <name since="OTP R16B01">block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} | Error</name>
- <name since="OTP R16B01">block_encrypt(aes_gcm | aes_ccm, Key, Ivec, {AAD, PlainText, TagLength}) -> {CipherText, CipherTag} | Error </name>
- <fsummary>Encrypt <c>PlainText</c> according to <c>Type</c> block cipher</fsummary>
- <type>
- <v>Type = <seetype marker="#block_cipher_with_iv">block_cipher_with_iv()</seetype></v>
- <v>AeadType = <seetype marker="#aead_cipher">aead_cipher()</seetype></v>
- <v>Key = <seetype marker="#key">key()</seetype> | <seetype marker="#des3_key">des3_key()</seetype></v>
- <v>PlainText = iodata()</v>
- <v>AAD = IVec = CipherText = CipherTag = binary()</v>
- <v>TagLength = 1..16</v>
- <v>Error = <seetype marker="#run_time_error">run_time_error()</seetype></v>
- </type>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Encrypt <c>PlainText</c> according to <c>Type</c> block cipher.
- <c>IVec</c> is an arbitrary initializing vector.</p>
- <p>In AEAD (Authenticated Encryption with Associated Data) mode, encrypt
- <c>PlainText</c>according to <c>Type</c> block cipher and calculate
- <c>CipherTag</c> that also authenticates the <c>AAD</c> (Associated Authenticated Data).</p>
- <p>May raise exception <c>error:notsup</c> in case the chosen <c>Type</c>
- is not supported by the underlying libcrypto implementation.</p>
- <p>For keylengths, iv-sizes and blocksizes see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- </desc>
- </func>
-
- <func>
- <name since="OTP R16B01">block_decrypt(Type, Key, Ivec, CipherText) -> PlainText | Error</name>
- <name since="OTP R16B01">block_decrypt(AeadType, Key, Ivec, {AAD, CipherText, CipherTag}) -> PlainText | Error</name>
- <fsummary>Decrypt <c>CipherText</c> according to <c>Type</c> block cipher</fsummary>
- <type>
- <v>Type = <seetype marker="#block_cipher_with_iv">block_cipher_with_iv()</seetype></v>
- <v>AeadType = <seetype marker="#aead_cipher">aead_cipher()</seetype></v>
- <v>Key = <seetype marker="#key">key()</seetype> | <seetype marker="#des3_key">des3_key()</seetype></v>
- <v>PlainText = iodata()</v>
- <v>AAD = IVec = CipherText = CipherTag = binary()</v>
- <v>Error = BadTag | <seetype marker="#run_time_error">run_time_error()</seetype></v>
- <v>BadTag = error</v>
- </type>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Decrypt <c>CipherText</c> according to <c>Type</c> block cipher.
- <c>IVec</c> is an arbitrary initializing vector.</p>
- <p>In AEAD (Authenticated Encryption with Associated Data) mode, decrypt
- <c>CipherText</c>according to <c>Type</c> block cipher and check the authenticity
- the <c>PlainText</c> and <c>AAD</c> (Associated Authenticated Data) using the
- <c>CipherTag</c>. May return <c>error</c> if the decryption or validation fail's</p>
- <p>May raise exception <c>error:notsup</c> in case the chosen <c>Type</c>
- is not supported by the underlying libcrypto implementation.</p>
- <p>For keylengths, iv-sizes and blocksizes see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- </desc>
- </func>
-
- <func>
- <name name="stream_init" arity="2" since="OTP R16B01"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Initializes the state for use in RC4 stream encryption
- <seemfa marker="#stream_encrypt/2">stream_encrypt</seemfa> and
- <seemfa marker="#stream_decrypt/2">stream_decrypt</seemfa></p>
- <p>For keylengths see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- </desc>
- </func>
-
- <func>
- <name name="stream_init" arity="3" since="OTP R16B01"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Initializes the state for use in streaming AES encryption using Counter mode (CTR).
- <c>Key</c> is the AES key and must be either 128, 192, or 256 bits long. <c>IVec</c> is
- an arbitrary initializing vector of 128 bits (16 bytes). This state is for use with
- <seemfa marker="#stream_encrypt/2">stream_encrypt</seemfa> and
- <seemfa marker="#stream_decrypt/2">stream_decrypt</seemfa>.</p>
- <p>For keylengths and iv-sizes see the
- <seeguide marker="crypto:algorithm_details#ciphers">User's Guide</seeguide>.
- </p>
- </desc>
- </func>
-
- <func>
- <name name="stream_encrypt" arity="2" since="OTP R16B01"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Encrypts <c>PlainText</c> according to the stream cipher <c>Type</c> specified in stream_init/3.
- <c>Text</c> can be any number of bytes. The initial <c>State</c> is created using
- <seemfa marker="#stream_init/2">stream_init</seemfa>.
- <c>NewState</c> must be passed into the next call to <c>stream_encrypt</c>.</p>
- </desc>
- </func>
-
- <func>
- <name name="stream_decrypt" arity="2" since="OTP R16B01"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p>Decrypts <c>CipherText</c> according to the stream cipher <c>Type</c> specified in stream_init/3.
- <c>PlainText</c> can be any number of bytes. The initial <c>State</c> is created using
- <seemfa marker="#stream_init/2">stream_init</seemfa>.
- <c>NewState</c> must be passed into the next call to <c>stream_decrypt</c>.</p>
- </desc>
- </func>
-
- <func>
- <name name="supports" arity="0" since="OTP R16B01"/>
- <fsummary>Provide a list of available crypto algorithms.</fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#supports/1">supports/1</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p></dont>
- <p> Can be used to determine which crypto algorithms that are supported
- by the underlying libcrypto library</p>
- <p>See <seemfa marker="#hash_info/1">hash_info/1</seemfa> and <seemfa marker="#cipher_info/1">cipher_info/1</seemfa>
- for information about the hash and cipher algorithms.
- </p>
- </desc>
- </func>
-
- <func>
- <name name="hmac" arity="3" since="OTP R16B"/>
- <name name="hmac" arity="4" since="OTP R16B"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac/4">mac/4</seemfa> or
- <seemfa marker="crypto#macN/5">macN/5</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Computes a HMAC of type <c>Type</c> from <c>Data</c> using
- <c>Key</c> as the authentication key.</p> <p><c>MacLength</c>
- will limit the size of the resultant <c>Mac</c>.</p>
- </desc>
- </func>
-
- <func>
- <name name="hmac_init" arity="2" since="OTP R14B03"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac_init/3">mac_init/3</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Initializes the context for streaming HMAC operations. <c>Type</c> determines
- which hash function to use in the HMAC operation. <c>Key</c> is the authentication
- key. The key can be any length.</p>
- </desc>
- </func>
-
- <func>
- <name name="hmac_update" arity="2" since="OTP R14B03"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac_update/2">mac_update/2</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Updates the HMAC represented by <c>Context</c> using the given <c>Data</c>. <c>Context</c>
- must have been generated using an HMAC init function (such as
- <seemfa marker="#hmac_init/2">hmac_init</seemfa>). <c>Data</c> can be any length. <c>NewContext</c>
- must be passed into the next call to <c>hmac_update</c>
- or to one of the functions <seemfa marker="#hmac_final/1">hmac_final</seemfa> and
- <seemfa marker="#hmac_final_n/2">hmac_final_n</seemfa>
- </p>
- <warning><p>Do not use a <c>Context</c> as argument in more than one
- call to hmac_update or hmac_final. The semantics of reusing old contexts
- in any way is undefined and could even crash the VM in earlier releases.
- The reason for this limitation is a lack of support in the underlying
- libcrypto API.</p></warning>
- </desc>
- </func>
-
- <func>
- <name name="hmac_final" arity="1" since="OTP R14B03"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac_final/1">mac_final/1</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Finalizes the HMAC operation referenced by <c>Context</c>. The size of the resultant MAC is
- determined by the type of hash function used to generate it.</p>
- </desc>
- </func>
-
- <func>
- <name name="hmac_final_n" arity="2" since="OTP R14B03"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac_finalN/2">mac_finalN/2</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Finalizes the HMAC operation referenced by <c>Context</c>. <c>HashLen</c> must be greater than
- zero. <c>Mac</c> will be a binary with at most <c>HashLen</c> bytes. Note that if HashLen is greater than the actual number of bytes returned from the underlying hash, the returned hash will have fewer than <c>HashLen</c> bytes.</p>
- </desc>
- </func>
-
- <func>
- <name name="cmac" arity="3" since="OTP 20.0"/>
- <name name="cmac" arity="4" since="OTP 20.0"/>
- <fsummary>Calculates the Cipher-based Message Authentication Code.</fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac/4">mac/4</seemfa> or
- <seemfa marker="crypto#macN/5">macN/5</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Computes a CMAC of type <c>Type</c> from <c>Data</c> using
- <c>Key</c> as the authentication key.</p> <p><c>MacLength</c>
- will limit the size of the resultant <c>Mac</c>.</p>
- </desc>
- </func>
-
- <func>
- <name name="poly1305" arity="2" since="OTP 21.1"/>
- <fsummary></fsummary>
- <desc>
- <dont><p>Don't use this function for new programs! Use
- <seemfa marker="crypto#mac/3">mac/3</seemfa> or
- <seemfa marker="crypto#macN/4">macN/4</seemfa> in
- <seeguide marker="crypto:new_api">the new api</seeguide>.</p>
- </dont>
- <p>Computes a POLY1305 message authentication code (<c>Mac</c>) from <c>Data</c> using
- <c>Key</c> as the authentication key.</p>
- </desc>
- </func>
-
- </funcs>
-
-
</erlref>
diff --git a/lib/crypto/doc/src/new_api.xml b/lib/crypto/doc/src/new_api.xml
index 54097dbfee..552fdc0287 100644
--- a/lib/crypto/doc/src/new_api.xml
+++ b/lib/crypto/doc/src/new_api.xml
@@ -49,37 +49,35 @@
<section>
<title>The old API</title>
- <p>The old functions - not recommended for new programs - are for chipers:</p>
+ <p>The old functions - deprecated from 23.0 and removed from OTP 24.0 - are for chipers:</p>
<list>
- <item><seemfa marker="crypto#block_encrypt/3">block_encrypt/3</seemfa></item>
- <item><seemfa marker="crypto#block_encrypt/4">block_encrypt/4</seemfa></item>
- <item><seemfa marker="crypto#block_decrypt/3">block_decrypt/3</seemfa></item>
- <item><seemfa marker="crypto#block_decrypt/4">block_decrypt/4</seemfa></item>
- <item><seemfa marker="crypto#stream_init/2">stream_init/2</seemfa></item>
- <item><seemfa marker="crypto#stream_init/2">stream_init/3</seemfa></item>
- <item><seemfa marker="crypto#stream_encrypt/2">stream_encrypt/2</seemfa></item>
- <item><seemfa marker="crypto#stream_decrypt/2">stream_decrypt/2</seemfa></item>
- <item><seemfa marker="crypto#next_iv/2">next_iv/2</seemfa></item>
- <item><seemfa marker="crypto#next_iv/3">next_iv/3</seemfa></item>
+ <item><c>block_encrypt/3</c></item>
+ <item><c>block_encrypt/4</c></item>
+ <item><c>block_decrypt/3</c></item>
+ <item><c>block_decrypt/4</c></item>
+ <item><c>stream_init/2</c></item>
+ <item><c>stream_init/3</c></item>
+ <item><c>stream_encrypt/2</c></item>
+ <item><c>stream_decrypt/2</c></item>
+ <item><c>next_iv/2</c></item>
+ <item><c>next_iv/3</c></item>
</list>
<p>for lists of supported algorithms:</p>
<list>
- <item><seemfa marker="crypto#supports/0">supports/0</seemfa></item>
+ <item><c>supports/0</c></item>
</list>
<p>and for MACs (Message Authentication Codes):</p>
<list>
- <item><seemfa marker="crypto#cmac/3">cmac/3</seemfa></item>
- <item><seemfa marker="crypto#cmac/4">cmac/4</seemfa></item>
- <item><seemfa marker="crypto#hmac/3">hmac/3</seemfa></item>
- <item><seemfa marker="crypto#hmac/4">hmac/4</seemfa></item>
- <item><seemfa marker="crypto#hmac_init/2">hmac_init/2</seemfa></item>
- <item><seemfa marker="crypto#hmac_update/2">hmac_update/2</seemfa></item>
- <item><seemfa marker="crypto#hmac_final/1">hmac_final/1</seemfa></item>
- <item><seemfa marker="crypto#hmac_final_n/2">hmac_final_n/2</seemfa></item>
- <item><seemfa marker="crypto#poly1305/2">poly1305/2</seemfa></item>
+ <item><c>cmac/3</c></item>
+ <item><c>cmac/4</c></item>
+ <item><c>hmac/3</c></item>
+ <item><c>hmac/4</c></item>
+ <item><c>hmac_init/2</c></item>
+ <item><c>hmac_update/2</c></item>
+ <item><c>hmac_final/1</c></item>
+ <item><c>hmac_final_n/2</c></item>
+ <item><c>poly1305/2</c></item>
</list>
- <p>They are deprecated from 23.0 and for removal in 24.0.
- </p>
</section>
<section>
@@ -137,8 +135,8 @@
<item><seemfa marker="crypto#cipher_info/1">cipher_info/1</seemfa></item>
</list>
- <p>The <seemfa marker="crypto#next_iv/2">next_iv/2</seemfa> and
- <seemfa marker="crypto#next_iv/3">next_iv/3</seemfa> is not needed since the
+ <p>The <c>next_iv/2</c> and
+ <c>next_iv/3</c> are not needed since the
<c>crypto_init</c> and <c>crypto_update</c> includes this functionality.
</p>