AES in dlang?

IchorDev zxinsworld at gmail.com
Sat Feb 15 08:00:26 UTC 2025


On Wednesday, 12 February 2025 at 00:20:02 UTC, Andy Valencia 
wrote:
> I was wondering about an @safe dlang version of AES, and just 
> couldn't find one.  (Well, there was one, but without any of 
> the nonce/IV stuff.)  I know many will be perfectly happy with 
> calls into C libraries, but for those who want to lean into D's 
> many safety features, I've ported a "Tiny AES" and begun wiring 
> up testing for it:
>
> https://sources.vsta.org:7100/dlang/file?name=tiny/aes.d&ci=tip

I made this tiny-AES port a while ago: 
https://code.dlang.org/packages/encrypt

It's fully `@safe`; it uses structs rather than classes, so no 
allocations are required; and there are already various unittests.


More information about the Digitalmars-d-learn mailing list