[erlang-patches] Add RIPEMD160 digest support to crypto

Michael Loftis <>
Fri Dec 21 19:38:06 CET 2012


I added the ripemd160 atom to the documentation, removed the exports, and
added the bits to the hash and hash_init family....There's a info/0
function that returns ?FUNC_LIST -- and I'm actually not clear on it's
use/behavior, but it appears that it is intended to indicate exported
crypto functions, so I've omitted the now non-exported functions from that
define.  Hopefully this is right, as this appears to be the first "example"
of a hash only function.


On Fri, Dec 21, 2012 at 2:51 AM, Fredrik <> wrote:

>  Hello Michael!
> The patch has been into review and the feedback:
> "
>
> New functions hash,hash_init,hash_update,hash_final has been added in
> master for R16. You should use them instead and not export your ripemd160
> functions.
>
> Documentation is missing."
>  Please fix this and I will fetch again.
>
>
> BR Fredrik Gustafsson
> Erlang OTP Team
>
> On 12/19/2012 07:05 PM, Michael Loftis wrote:
>
> Entirely my fault, I missed two #define's when I moved the patch from the
> crypto module I forked back at R13 back into the R15 source.  I only got
> R15 to compile today, R15 and my javac do not get along (but I don't use
> any of that anyway).
>
>  I've updated the github repo, same branch.
>
>
>
> https://github.com/mloftis/otp/compare/master-pu...crypto-add-ripemd160-digest
>
> https://github.com/mloftis/otp/compare/master-pu...crypto-add-ripemd160-digest.patch
>
>  git fetch git://github.com/mloftis/otp.git crypto-add-ripemd160-digest
>
>
>
> On Wed, Dec 19, 2012 at 1:15 AM, Fredrik <> wrote:
>
>>  Hello Michael,
>> It does not build:
>> crypto.c: In function ‘ripemd160’:
>> crypto.c:621:28: error: ‘RIPEMD160_LEN’ undeclared (first use in this
>> function)
>> crypto.c:621:28: note: each undeclared identifier is reported only once
>> for each function it appears in
>> crypto.c: In function ‘ripemd160_init’:
>> crypto.c:627:64: error: ‘RIPEMD160_CTX_LEN’ undeclared (first use in this
>> function)
>> crypto.c: In function ‘ripemd160_update’:
>> crypto.c:636:22: error: ‘RIPEMD160_CTX_LEN’ undeclared (first use in this
>> function)
>> crypto.c: In function ‘ripemd160_final’:
>> crypto.c:650:73: error: ‘RIPEMD160_CTX_LEN’ undeclared (first use in this
>> function)
>> crypto.c:654:47: error: ‘RIPEMD160_LEN’ undeclared (first use in this
>> function)
>>
>> Please take a look at this and give me a notice.
>>
>>
>> BR Fredrik Gustafsson
>> Erlang OTP Team
>> On 12/18/2012 11:10 PM, Michael Loftis wrote:
>>
>>  Apologies, done...
>>
>>
>> https://github.com/mloftis/otp/compare/master...crypto-add-ripemd160-digest
>>
>> https://github.com/mloftis/otp/compare/master...crypto-add-ripemd160-digest.patch
>>
>>  git fetch git://github.com/mloftis/otp.git crypto-add-ripemd160-digest
>>
>>
>>
>>
>> On Tue, Dec 18, 2012 at 1:45 PM, Tuncer Ayaz <>wrote:
>>
>>> On Tue, Dec 18, 2012 at 10:35 PM, Michael Loftis wrote:
>>> >
>>> > Add ripemd160 digest support to crypto. Includes a couple test
>>> > cases.
>>> >
>>> >
>>>  > git fetch git://github.com/mloftis/otp.gitcrypto-add-ripemd160-digest
>>> >
>>> > This is based off of master-pu as of a few moments ago, my read of
>>> > the requirements tells me that should be the correct spot since I'm
>>> > adding a new feature to the crypto module.
>>>
>>>  A patch for 'master-pu' has to be based off 'master'.
>>>
>>> > Not fully tested with the current erlang since jinterface has
>>> > completely broken my build on all platforms -- even if it is
>>> > disabled it still kills my build on most platforms because it's
>>> > using sh with scripts that have bash semantics. Might have a chance
>>> > to clean up that separate issue today and submit patches.
>>>
>>
>>
>>
>>  --
>>
>> "Genius might be described as a supreme capacity for getting its
>> possessors
>> into trouble of all kinds."
>> -- Samuel Butler
>>
>>
>>
>>   _______________________________________________
>> erlang-patches mailing ://erlang.org/mailman/listinfo/erlang-patches
>>
>>
>>
>
>
>  --
>
> "Genius might be described as a supreme capacity for getting its possessors
> into trouble of all kinds."
> -- Samuel Butler
>
>
>


-- 

"Genius might be described as a supreme capacity for getting its possessors
into trouble of all kinds."
-- Samuel Butler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20121221/a72fd657/attachment.html>


More information about the erlang-patches mailing list