05nelsonm / encoding

A Kotlin Multiplatform library for configurable, streamable, efficient and extensible Encoding/Decoding with support for base16/32/64.
Apache License 2.0
33 stars 5 forks source link

internal `decode` extension function should clear bytes on failure #131

Closed 05nelsonm closed 1 year ago

05nelsonm commented 1 year ago

io.matthewnelson.encoding.core.internal.-EncoderDecoder.kt.decode function should use a try/catch block surrounding the entire feed such that upon any exception being thrown, the underlying ByteArray is zero'd out (before re-throwing the exception).