Network Programming in .NET


Home | Pages | Archives


Add a #FingerPrint reader to a C# WinForms app

January 15, 2023 12:32 pm

Probably a good way to add extra security to a Windows Form app, just to make sure that there is a real human user infront of the screen, and it’s not some bot trying to interact with your software, is to add a Fingerprint / “Windows Hello” login. Of course, in the real world, generally the attacker would probably try to de-compile your software and try to attack whatever underlying API you are using. However, this is a very visible security feature, and if you’re looking for a super-quick security addition, then, this may be an interesting addition.

Windows Hello is a biometric authentication feature that allows users to log into their Windows device using a fingerprint scanner, facial recognition, or other biometric methods, rather than a password.

Some potential use cases for including Windows Hello in a WinForms app include:

Here is a link to a public GitHub Repo that shows a simple example of this in action: https://github.com/infiniteloopltd/FingerPrintReader

The Key code being;

var supported = await KeyCredentialManager.IsSupportedAsync();
if (!supported) return;
var result =
	await KeyCredentialManager.RequestCreateAsync("login",
		KeyCredentialCreationOption.ReplaceExisting);
if (result.Status == KeyCredentialStatus.Success)
{
	MessageBox.Show("Logged in.");
}
else
{
	MessageBox.Show("Login failed.");
}

Posted by Infinite Loop Development Ltd

Categories: Uncategorized

Tags:

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.