Useful snippets

This is for small stuff I don’t want to forget, usually too small to deserve a blog post of its own.

1 Response to Useful snippets

  1. eidand says:

    for base64 decoding to a specific byte[] size

    A byte uses 4/3 characters, so x number of bytes uses (x*4+2)/3 data characters. For 32 bytes that is 43 characters, and then it has a single = to pad it to an even four-character boundary

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s