Exemplo n.º 1
0
 /// <exception cref="U2FException"/>
 /// <exception cref="System.IO.IOException"/>
 public static KeyRegisterResponse ParseRegisterResponse(Stream inputStream)
 {
     using (var dataInputStream = new EndianReader(inputStream, Endianness.BigEndian))
     {
         return(RawMessageCodec.DecodeKeyRegisterResponse(ParseMessage(dataInputStream).Segment()));
     }
 }
Exemplo n.º 2
0
        public static KeyResponse <KeyRegisterResponse> DecodeRegisterReponse(ApduResponse apdu)
        {
            var status   = ParseKeyResponseStatus(apdu.Status);
            var response = status == KeyResponseStatus.Success
                ? RawMessageCodec.DecodeKeyRegisterResponse(apdu.ResponseData)
                : null;

            return(new KeyResponse <KeyRegisterResponse>(apdu, response, status));
        }