Wait you are not using `extlen` anywhere, except those two calls to `hex_decode` and `base64_decode`. And `len` is changed right after them, what's the point of storing it in two locations then?