public FidoStartedRegistration StartRegistration(FidoAppId appId)
        {
            var challengeBytes = _generateFidoChallenge.GenerateChallenge();
            var challenge      = WebSafeBase64Converter.ToBase64String(challengeBytes);

            return(new FidoStartedRegistration(appId, challenge));
        }
        public static FidoAttestationCertificate FromWebSafeBase64(string attestationCertificate)
        {
            if (attestationCertificate == null)
            {
                throw new ArgumentNullException("attestationCertificate");
            }

            return(new FidoAttestationCertificate(WebSafeBase64Converter.FromBase64String(attestationCertificate)));
        }
Exemple #3
0
        public static FidoPublicKey FromWebSafeBase64(string publicKey)
        {
            if (publicKey == null)
            {
                throw new ArgumentNullException("publicKey");
            }

            return(new FidoPublicKey(WebSafeBase64Converter.FromBase64String(publicKey)));
        }
Exemple #4
0
        public static FidoSignature FromWebSafeBase64(string signature)
        {
            if (signature == null)
            {
                throw new ArgumentNullException("signature");
            }

            return(new FidoSignature(WebSafeBase64Converter.FromBase64String(signature)));
        }
Exemple #5
0
        public static FidoKeyHandle FromWebSafeBase64(string keyHandle)
        {
            if (keyHandle == null)
            {
                throw new ArgumentNullException("keyHandle");
            }

            return(new FidoKeyHandle(WebSafeBase64Converter.FromBase64String(keyHandle)));
        }
        public FidoStartedAuthentication StartAuthentication(FidoAppId appId, FidoDeviceRegistration deviceRegistration)
        {
            if (appId == null)
            {
                throw new ArgumentNullException("appId");
            }
            if (deviceRegistration == null)
            {
                throw new ArgumentNullException("deviceRegistration");
            }

            var challenge = _generateFidoChallenge.GenerateChallenge();

            return(new FidoStartedAuthentication(appId,
                                                 WebSafeBase64Converter.ToBase64String(challenge),
                                                 deviceRegistration.KeyHandle));
        }
 public string ToWebSafeBase64()
 {
     return(WebSafeBase64Converter.ToBase64String(RawData));
 }
Exemple #8
0
 public string ToWebSafeBase64()
 {
     return(WebSafeBase64Converter.ToBase64String(_bytes));
 }
Exemple #9
0
 public static FidoSignatureData FromWebSafeBase64(string webSafeBase64)
 {
     return(FromBytes(WebSafeBase64Converter.FromBase64String(webSafeBase64)));
 }
Exemple #10
0
 public static FidoRegistrationData FromWebSafeBase64(string webSafeBase64)
 {
     return(FromBytes(WebSafeBase64Converter.FromBase64String(webSafeBase64)));
 }
Exemple #11
0
 public string ToWebSafeBase64()
 {
     return(WebSafeBase64Converter.ToBase64String(ToJson()));
 }
Exemple #12
0
        public static FidoClientData FromWebSafeBase64(string base64)
        {
            var json = WebSafeBase64Converter.FromBase64String(base64);

            return(FromJson(Encoding.UTF8.GetString(json, 0, json.Length)));
        }