Base64-decoded strings cuts off at hex value 00

Comments

1 comment

  • Leon Brocard

    Hi James,

    You are correct: at the moment strings in VCL are C-like and are NUL (0x00) terminated.

    Unfortunately this means that you can't base64 decode strings which might contain NUL characters. Any bytes following the NUL byte will be ignored.

    Could you explain your use case a little? Why would you concatenate two binary strings?

    For popular cases, such as digest.awsv4_hmac() for AWSv4 message authentication we have built a separate function to take the calculation out of VCL and into C.

    Regards, Léon

    0
    Comment actions Permalink

Please sign in to leave a comment.