botan icon indicating copy to clipboard operation
botan copied to clipboard

Use slices instead of ptr-length-pairs

Open lionello opened this issue 7 years ago • 1 comments

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 .

lionello avatar Jun 27 '17 11:06 lionello

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)

etcimon avatar Jun 27 '17 11:06 etcimon