aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreaP <[email protected]>2014-12-23 15:38:51 +0100
committerMarcus Arendt <[email protected]>2015-01-09 10:32:37 +0100
commit8f45c2409ca2f28f716f01d09047c6bb6f90d9b9 (patch)
treef14ec9ac42a4e71a88ca59e6adf61c498713958a
parentbd65ff0b39f3bfb23cef865dd03044a99d97d2fd (diff)
downloadotp-8f45c2409ca2f28f716f01d09047c6bb6f90d9b9.tar.gz
otp-8f45c2409ca2f28f716f01d09047c6bb6f90d9b9.tar.bz2
otp-8f45c2409ca2f28f716f01d09047c6bb6f90d9b9.zip
proposal of documentation
-rw-r--r--lib/crypto/doc/src/crypto.xml31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 271130a9e6..77cff252ef 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -169,7 +169,38 @@
</section>
<funcs>
+ <func>
+ <name>block_encrypt(Type, Key, PlainText) -> CipherText</name>
+ <fsummary>Encrypt <c>PlainText</c>according to <c>Type</c> block cipher</fsummary>
+ <type>
+ <v>Type = des_ecb | blowfish_ecb | aes_ecb </v>
+ <v>Key = block_key() </v>
+ <v>PlainText = iodata() </v>
+ </type>
+ <desc>
+ <p>Encrypt <c>PlainText</c>according to <c>Type</c> block cipher.
+ <p>May throw exception <c>notsup</c> in case the chosen <c>Type</c>
+ is not supported by the underlying OpenSSL implementation.</p>
+ </desc>
+ </func>
+
<func>
+ <name>block_decrypt(Type, Key, CipherText) -> PlainText</name>
+ <fsummary>Decrypt <c>CipherText</c>according to <c>Type</c> block cipher</fsummary>
+ <type>
+ <v>Type = des_ecb | blowfish_ecb | aes_ecb </v>
+ <v>Key = block_key() </v>
+ <v>PlainText = iodata() </v>
+ </type>
+ <desc>
+ <p>Decrypt <c>CipherText</c>according to <c>Type</c> block cipher.
+ <p>May throw exception <c>notsup</c> in case the chosen <c>Type</c>
+ is not supported by the underlying OpenSSL implementation.</p>
+ </desc>
+ </func>
+
+ <funcs>
+ <func>
<name>block_encrypt(Type, Key, Ivec, PlainText) -> CipherText</name>
<name>block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag}</name>
<fsummary>Encrypt <c>PlainText</c> according to <c>Type</c> block cipher</fsummary>