Trim whitespace from public key and private key