On Monday, 13 July 2015 at 15:49:39 UTC, puzzlehawk wrote:
dcrypt is a cryptography library written entirely in D and a little bit D inline assembler. The library is inspired by BouncyCastle. Most important symmetric algorithms are implemented but work on asymmetric cryptography has not yet started. dcrypt is not yet ready for daily use. There's a lot of work to be done and I'll be glad to get some feedback or collaboration.


Nice work!

For the hashes, I think you should follow the interface of the Phobos std.digest package, with `start`, `put` and `finish` methods:

http://dlang.org/phobos/std_digest_digest.html

Also, in 2.068 there will be an optional enum `blockSize` (in bits) for the hash algorithms, for use with the newly added std.digest.hmac. Your library has a runtime method for that. Isn't the block size always known at compile time? If you could change it to an enum, your library would be compatible with Phobos.

Maybe a similar interface should be used for the block ciphers?

Reply via email to