mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert r46828
r46828 "md5ossl.c: indicate the result" caused segfaults. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2d33fc97a3
commit
5dbe603f09
3 changed files with 7 additions and 30 deletions
|
@ -4,22 +4,10 @@
|
|||
#define MD5OSSL_H_INCLUDED
|
||||
|
||||
#include <stddef.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/md5.h>
|
||||
|
||||
#define MD5_Init rb_digest_md5osslevp_Init
|
||||
#define MD5_Update EVP_DigestUpdate
|
||||
#define MD5_Finish rb_digest_md5osslevp_Finish
|
||||
#define MD5_CTX EVP_MD_CTX
|
||||
#define MD5_BLOCK_LENGTH MD5_CBLOCK
|
||||
|
||||
/* We should use EVP_MD_size(3) and EVP_MD_block_size(3), but the
|
||||
advantage of these is that they are flexible across digest
|
||||
algorithms and we are fixing the digest algorithm here; and these
|
||||
numbers must be constants because the rb_digest_metadata_t
|
||||
structure is declared const. Simplest way is to write literals. */
|
||||
#define MD5_BLOCK_LENGTH 64
|
||||
#define MD5_DIGEST_LENGTH 16
|
||||
|
||||
int MD5_Init(MD5_CTX *pctx);
|
||||
int MD5_Finish(MD5_CTX *pctx, unsigned char *digest);
|
||||
void MD5_Finish(MD5_CTX *pctx, unsigned char *digest);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue