Improved XOR speed.
Added input validation to UserCredential functions.  Added documentation to header.