Read complete seed files given in -rand options.
[openssl.git] / doc / crypto / EVP_DigestInit.pod
index b21e1013b30c19f50b94bc65acf6ec9c758a76f4..345b1ddfa79c896875db6ab7d763c53a27cb20af 100644 (file)
@@ -9,8 +9,9 @@ EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal - EVP digest routines
  #include <openssl/evp.h>
 
  void EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
- void EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, unsigned int cnt);
- void EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
+ void EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt);
+ void EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
+        unsigned int *s);
 
  #define EVP_MAX_MD_SIZE (16+20) /* The SSLv3 md5+sha1 type */
 
@@ -21,9 +22,10 @@ EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal - EVP digest routines
  #define EVP_MD_size(e)                        ((e)->md_size)
  #define EVP_MD_block_size(e)          ((e)->block_size)
 
+ #define EVP_MD_CTX_md(e)              (e)->digest)
  #define EVP_MD_CTX_size(e)            EVP_MD_size((e)->digest)
  #define EVP_MD_CTX_block_size(e)      EVP_MD_block_size((e)->digest)
- #define EVP_MD_CTX_type(e)            ((e)->digest)
+ #define EVP_MD_CTX_type(e)            EVP_MD_type((e)->digest)
 
  EVP_MD *EVP_md_null(void);
  EVP_MD *EVP_md2(void);
@@ -75,7 +77,7 @@ representing the given message digest when passed an B<EVP_MD> structure.
 For example EVP_MD_type(EVP_sha1()) returns B<NID_sha1>. This function is
 normally used when setting ASN1 OIDs.
 
-EVP_MD_CTX_type() returns the B<EVP_MD> structure corresponding to the passed
+EVP_MD_CTX_md() returns the B<EVP_MD> structure corresponding to the passed
 B<EVP_MD_CTX>.
 
 EVP_MD_pkey_type() returns the NID of the public key signing algorithm associated
@@ -95,7 +97,7 @@ returns is of zero length.
 
 EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj()
 return an B<EVP_MD> structure when passed a digest name, a digest NID or
-and ASN1_OBJECT structure respectively. The digest table must be initialised
+an ASN1_OBJECT structure respectively. The digest table must be initialised
 using, for example, OpenSSL_add_all_digests() for these functions to work.
 
 =head1 RETURN VALUES
@@ -111,11 +113,11 @@ EVP_MD_size(), EVP_MD_block_size(), EVP_MD_CTX_size(e), EVP_MD_size(),
 EVP_MD_CTX_block_size()        and EVP_MD_block_size() return the digest or block
 size in bytes.
 
-EVP_md_null(), EVP_MD *EVP_md2(), EVP_MD *EVP_md5(), EVP_MD *EVP_sha(),
-EVP_sha1(), EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() return
-pointers to the corresponding EVP_MD structures.
+EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_dss(),
+EVP_dss1(), EVP_mdc2() and EVP_ripemd160() return pointers to the
+corresponding EVP_MD structures.
 
-B<EVP_get_digestbyname>, B<EVP_get_digestbynid> and B<EVP_get_digestbyobj>
+EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj()
 return either an B<EVP_MD> structure or NULL if an error occurs.
 
 =head1 NOTES
@@ -170,9 +172,6 @@ digest name passed on the command line.
 
 =head1 BUGS
 
-B<EVP_MD_CTX_type> is not a good name because its name wrongly implies it does
-the same as B<EVP_MD_type> but takes an B<EVP_MD_CTX> parameter instead.
-
 Several of the functions do not return values: maybe they should. Although the
 internal digest operations will never fail some future hardware based operations
 might.
@@ -188,7 +187,7 @@ in code that must be recompiled if the size of B<EVP_MD_CTX> increases.
 
 L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>,
 L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>,
-L<sha(3)|sha(3)>
+L<sha(3)|sha(3)>, L<digest(1)|digest(1)>
 
 =head1 HISTORY