Byte Order Swapping Function

Piotr Szturmaj bncrbme at jadamspam.pl
Thu Jul 14 06:20:24 PDT 2011


Regan Heath wrote:
> On Thu, 14 Jul 2011 11:44:23 +0100, Piotr Szturmaj
> <bncrbme at jadamspam.pl> wrote:
>
>> Regan Heath wrote:
>>> On Thu, 14 Jul 2011 08:14:10 +0100, Jonathan M Davis
>>> <jmdavisProg at gmx.com> wrote:
>>>> I did have to create a 64-bit version for std.datetime, so it has a
>>>> private
>>>> function called endianSwap64 to do the job. So, it's not like I'm
>>>> saying that
>>>> the situation couldn't be improved, but druntime and Phobos do
>>>> currently give
>>>> you the exact same thing that C and C++ do.
>>>
>>> The crypto library I have been meaning to polish up and submit for
>>> inclusion into phobos needs these functions in several variants. I was
>>> hoping they could/would be included somewhere more 'general' at some
>>> stage, and any duplicates like those already mentioned removed..
>>>
>>
>> Interesting. Yesterday, I wrote SHA256 implementation and I wanted to
>> add other SHA variants as well. I also thought about adding other
>> algorithms like encryption, HMAC, PBKDF2 and submitting it into phobos
>> too.
>>
>> Did you publish your library on some website? I'm interested in how
>> the API looks :)
>>
>> Also, what algorithms have you implemented?
>
> My code was integrated into .. <quiet voice>Tango</quiet voice> by one
> of that team, because at the time it was impossible to add things to
> phobos.
>
> You can see it here:
> http://www.dsource.org/projects/tango/docs/current/
> (tango.util.digest etc)

Nice, Thanks! I remember I did see it some time ago.

> I implemented all of those except for Whirlpool. I still have the
> originals, which I started to tidy for inclusion into phobos .. at least
> that was the plan, I don't have a lot of spare time for this soft of
> thing unfortunately.
>

I would try implementing these and other crypto algorithms, and then we 
will see... the amount of my free time is currently not predictable.


More information about the Digitalmars-d mailing list