Add key base64 and substring validation
Merge pull request #1 from danneu/key-validation

Add key base64 and substring validation