-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ext/digest/sha2: Use OpenSSL's SHA1 engine if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- Loading branch information
Showing
8 changed files
with
85 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
Mon Feb 22 11:21:18 2010 Nobuyoshi Nakada <[email protected]> | ||
|
||
* ext/digest/sha2: Use OpenSSL's SHA1 engine if available. | ||
|
||
Sun Feb 21 21:20:17 2010 Nobuyoshi Nakada <[email protected]> | ||
|
||
* lib/mkmf.rb (create_makefile, install_files): honor srcprefix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "defs.h" | ||
#include "sha2ossl.h" | ||
|
||
#define SHA_Finish(bit) \ | ||
void SHA##bit##_Finish(SHA##bit##_CTX *ctx, char *buf) \ | ||
{ SHA##bit##_Final((unsigned char *)buf, ctx);} | ||
#define SHA384_Final SHA512_Final | ||
|
||
SHA_Finish(256) | ||
SHA_Finish(384) | ||
SHA_Finish(512) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef SHA2OSSL_H_INCLUDED | ||
#define SHA2OSSL_H_INCLUDED | ||
|
||
#include <stddef.h> | ||
#include <openssl/sha.h> | ||
|
||
#define SHA256_BLOCK_LENGTH SHA256_CBLOCK | ||
#define SHA384_BLOCK_LENGTH SHA512_CBLOCK | ||
#define SHA512_BLOCK_LENGTH SHA512_CBLOCK | ||
|
||
typedef SHA512_CTX SHA384_CTX; | ||
|
||
void SHA256_Finish(SHA256_CTX *ctx, char *buf); | ||
void SHA384_Finish(SHA384_CTX *ctx, char *buf); | ||
void SHA512_Finish(SHA512_CTX *ctx, char *buf); | ||
|
||
#endif |