vt-middleware / cryptacular

The friendly complement to the BouncyCastle crypto API for Java.
Other
39 stars 7 forks source link

Include a null terminator for byte[]. #45

Closed dfish3r closed 6 years ago

dfish3r commented 6 years ago

See #44.

dfish3r commented 6 years ago

I'm not certain what should be done if the input is already null terminated. I added a check so that the terminator isn't added if it already exists. I think the spec could be read either way.

serac commented 6 years ago

I think adding iff not exists is perfectly reasonable, especially in the absence of evidence one way or the other. In the end, though, it's all about client support, so if there's an important implementation that always adds a null terminator we could justify doing that for the sake of interoperability.