The DKIM key is base64 encoded, meaning it can end with "=" signs Split on "=" and check if you have 2 'parts' (key and value) will fail in these cases. By using split("=",1) we make sure we only slit on the first occurence of the "=" sign