From c6270678e0c4297440c2b191ad500b33ed18af5f Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 9 Mar 2017 15:25:21 +0100 Subject: crypto: Document exceptions thrown in crypto:generate_key --- lib/crypto/doc/src/crypto.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 440c5bd204..3192ec0de8 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -312,13 +312,17 @@

Generates a public key of type Type. See also public_key:generate_key/1. - May throw exception low_entropy in case the random generator - failed due to lack of secure "randomness". -

+ May throw exception an exception of class error: +

+ + badarg: an argument is of wrong type or has an illegal value, + low_entropy: the random generator failed due to lack of secure "randomness", + computation_failed: the computation fails of another reason than low_entropy. +

RSA key generation is only available if the runtime was built with dirty scheduler support. Otherwise, attempting to - generate an RSA key will throw exception notsup.

+ generate an RSA key will throw exception error:notsup.

-- cgit v1.2.3