From 651a9c3e8fe3f33182615ea39b62a15dcb2c0944 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 19 Mar 2019 16:41:08 +0100 Subject: crypto: Cuddle error types and documentation of them --- lib/crypto/doc/src/crypto.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/crypto/doc/src/crypto.xml') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 64872d7414..aecb1890d0 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -623,9 +623,9 @@ - block_encrypt(Type, Key, Ivec, PlainText) -> CipherText - block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} - block_encrypt(aes_gcm | aes_ccm, Key, Ivec, {AAD, PlainText, TagLength}) -> {CipherText, CipherTag} + block_encrypt(Type, Key, Ivec, PlainText) -> CipherText | Error + block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} | Error + block_encrypt(aes_gcm | aes_ccm, Key, Ivec, {AAD, PlainText, TagLength}) -> {CipherText, CipherTag} | Error Encrypt PlainText according to Type block cipher Type = block_cipher_iv() @@ -634,6 +634,7 @@ PlainText = iodata() AAD = IVec = CipherText = CipherTag = binary() TagLength = 1..16 + Error = run_time_error()

Encrypt PlainText according to Type block cipher. @@ -650,8 +651,8 @@ - block_decrypt(Type, Key, Ivec, CipherText) -> PlainText - block_decrypt(AeadType, Key, Ivec, {AAD, CipherText, CipherTag}) -> PlainText | error + block_decrypt(Type, Key, Ivec, CipherText) -> PlainText | Error + block_decrypt(AeadType, Key, Ivec, {AAD, CipherText, CipherTag}) -> PlainText | Error Decrypt CipherText according to Type block cipher Type = block_cipher_iv() @@ -659,6 +660,7 @@ Key = key() | des3_key() PlainText = iodata() AAD = IVec = CipherText = CipherTag = binary() + Error = run_time_error()

Decrypt CipherText according to Type block cipher. -- cgit v1.2.3