public bool RemoveRegisteredKey(UserAndKeyHintMessage message)
        {
            bool retval = false;

            try
            {
                retval = DAL.Instance.RemoveRegisteredKey(message.UserId, message.PublicKeyHint);
            }
            catch (Exception)
            {
            }
            return(retval);
        }
        public string RequestChallenge(UserAndKeyHintMessage message)
        {
            try
            {
                byte[] challengeBuffer = new byte[16];
                // Generate Random nonce
                RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
                rng.GetBytes(challengeBuffer);

                DAL.Instance.SetActiveChallenge(message.UserId, message.PublicKeyHint, challengeBuffer);
                return(Convert.ToBase64String(challengeBuffer));
            }
            catch (Exception)
            {
                return(string.Empty);
            }
        }
        public bool RemoveRegisteredKey(UserAndKeyHintMessage message)
        {
            bool retval = false;
            try
            {
                retval = _credentialService.RemoveCredential(message.UserId, message.PublicKeyHint);
            }
            catch (Exception)
            { }

            return retval;
        }
        public string RequestChallenge(UserAndKeyHintMessage message)
        {
            try
            {
                string challenge = Guid.NewGuid().ToString("N");

                _credentialService.SetActiveChallenge(message.UserId, message.PublicKeyHint, challenge);
                return challenge;
            }
            catch (Exception)
            {
                return string.Empty;
            }
        }