etcimon / botan

Block & stream ciphers, public key crypto, hashing, KDF, MAC, PKCS, TLS, ASN.1, BER/DER, etc.
Other
86 stars 22 forks source link

Use slices instead of ptr-length-pairs #36

Closed lionello closed 1 year ago

lionello commented 7 years ago

Like the C++ code, on many places the API requires a ptr-length-pair:

    this(const(ubyte)* input, size_t length, Base base = Binary)

The proper D way would be to provide a slice instead:

    this(const(ubyte)[] input, Base base = Binary)

I can make this change, but would like to know if this is OK, @etcimon .

etcimon commented 7 years ago

This would be good to me, although the algorithms use pointers and position increments, so there would be a lot of modifications to complete this change (1000+ lines)