From 192c2c04da9916221493fae27df1b387f6682c95 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Fri, 31 May 2013 11:53:25 +0200 Subject: crypto: Document enhancement --- lib/crypto/doc/src/crypto.xml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'lib/crypto/doc') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index bdccfee341..2df407018e 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -249,7 +249,7 @@ hash(Type, Data) -> Digest - Type = md4 | message_digest_algorithms() + Type = md4 | hash_algorithms() Data = iodata() Digest = binary() @@ -264,7 +264,7 @@ hash_init(Type) -> Context - Type = md4 | message_digest_algorithms() + Type = md4 | hash_algorithms()

Initializes the context for streaming hash operations. Type determines @@ -308,7 +308,7 @@ hmac(Type, Key, Data, MacLength) -> Mac - Type = message_digest_algorithms() + Type = hash_algorithms() - except ripemd160 Key = iodata() Data = iodata() MacLength = integer() @@ -325,7 +325,7 @@ hmac_init(Type, Key) -> Context - Type = message_digest_algorithms() + Type = hash_algorithms() - except ripemd160 Key = iodata() Context = binary() @@ -475,7 +475,7 @@ used mode. The size of the Msg must be less than byte_size(N)-11 if rsa_pkcs1_padding is used, and byte_size(N) if rsa_no_padding - is used. + is used, where N is public modulus of the RSA key. See also public_key:encrypt_private/[2,3]

@@ -513,18 +513,20 @@ ChipherText = binary() -

Encrypts the PlainText (usually a session key) using the PublicKey - and returns the CipherText. The Padding decides what padding mode is used, - rsa_pkcs1_padding is PKCS #1 v1.5 currently the most - used mode and rsa_pkcs1_oaep_padding is EME-OAEP as - defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty encoding - parameter. This mode is recommended for all new applications. - The size of the Msg must be less - than byte_size(N)-11 if - rsa_pkcs1_padding is used, byte_size(N)-41 if - rsa_pkcs1_oaep_padding is used and byte_size(N) if rsa_no_padding - is used. - See also public_key:encrypt_public/[2,3] +

Encrypts the PlainText (usually a session key) using + the PublicKey and returns the CipherText. The + Padding decides what padding mode is used, + rsa_pkcs1_padding is PKCS #1 v1.5 currently the most + used mode and rsa_pkcs1_oaep_padding is EME-OAEP as + defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty encoding + parameter. This mode is recommended for all new + applications. The size of the Msg must be less than + byte_size(N)-11 if rsa_pkcs1_padding is + used, byte_size(N)-41 if + rsa_pkcs1_oaep_padding is used and + byte_size(N) if rsa_no_padding is used, where N is public modulus of the RSA key. + See also public_key:encrypt_public/[2,3]

-- cgit v1.2.3