示例#1
0
 public virtual void TestEncodeRegisterResponse()
 {
     var registerResponse = new KeyRegisterResponse(USER_PUBLIC_KEY_ENROLL_HEX, KEY_HANDLE, VENDOR_CERTIFICATE,
         SIGNATURE_ENROLL);
     var encodedBytes = RawMessageCodec.EncodeKeyRegisterResponse(registerResponse);
     CollectionAssert.AreEqual(REGISTRATION_RESPONSE_DATA, encodedBytes);
 }
 protected bool Equals(KeyRegisterResponse other)
 {
     return UserPublicKey.SequenceEqual(other.UserPublicKey) && KeyHandle.SequenceEqual(other.KeyHandle) &&
            Equals(AttestationCertificate, other.AttestationCertificate) &&
            Signature.SequenceEqual(other.Signature);
 }
示例#3
0
 /// <exception cref="System.IO.IOException"/>
 /// <exception cref="U2FException"/>
 public static void SendRegisterResponse(Stream outputStream, KeyRegisterResponse keyRegisterResponse)
 {
     SendResponse(outputStream, RawMessageCodec.EncodeKeyRegisterResponse(keyRegisterResponse));
 }
 public static RegisterOperationResult Success(KeyRegisterRequest request, KeyRegisterResponse response)
 {
     return new RegisterOperationResult(KeyResponseStatus.Success, request, response);
 }
 private RegisterOperationResult(KeyResponseStatus status, KeyRegisterRequest request, KeyRegisterResponse response)
 {
     Status = status;
     Request = request;
     Response = response;
 }
示例#6
0
 protected bool Equals(KeyRegisterResponse other)
 {
     return(UserPublicKey.SequenceEqual(other.UserPublicKey) && KeyHandle.SequenceEqual(other.KeyHandle) &&
            Equals(AttestationCertificate, other.AttestationCertificate) &&
            Signature.SequenceEqual(other.Signature));
 }