mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
digest: CommonDigest
* ext/digest/digest_conf.rb (digest_conf): check for CommonDigest. * ext/digest/*/*cc.h: for Apple CommonCrypto/CommonDigest.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
935275bb59
commit
b97ceb66e9
8 changed files with 77 additions and 1 deletions
14
ext/digest/sha1/sha1cc.h
Normal file
14
ext/digest/sha1/sha1cc.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#define COMMON_DIGEST_FOR_OPENSSL 1
|
||||
#include <CommonCrypto/CommonDigest.h>
|
||||
|
||||
#define SHA1_BLOCK_LENGTH CC_SHA1_BLOCK_BYTES
|
||||
#define SHA1_DIGEST_LENGTH CC_SHA1_DIGEST_LENGTH
|
||||
#define SHA1_CTX CC_SHA1_CTX
|
||||
|
||||
static DEFINE_UPDATE_FUNC_FOR_UINT(SHA1);
|
||||
static DEFINE_FINISH_FUNC_FROM_FINAL(SHA1);
|
||||
|
||||
#undef SHA1_Update
|
||||
#undef SHA1_Finish
|
||||
#define SHA1_Update rb_digest_SHA1_update
|
||||
#define SHA1_Finish rb_digest_SHA1_finish
|
Loading…
Add table
Add a link
Reference in a new issue