lemon
lemon

Reputation: 346

How to encode user authentication in a barcode

I'm asked to add the possibility to scan barcode (on a badge) to authenticate users when they log in my app.

In this context, my customer has no standard (he does not use badges for now) but would like to use these same barcodes/badges for other apps.

Of course, it cannot be encoded in 'user/separator/password' way, because that will show the password when scanned in any simple text editor.

So, my question is: is there any standards about that?

Also, I'm not aware that barcode scanners are providing builtin functions for that, but are they?

If none of the above, how could it be done?

Preferably, the barcodes I'd want to use may be 1D barcodes.

The authentication needs to be one step in this context.

I'm coding in C#.

Thanks

Edit, for a precision: some login I've to handle are under LDAP.

Upvotes: 0

Views: 219

Answers (1)

j03p
j03p

Reputation: 341

You could hash the password in the barcode:

barcode example:

user/password
johndoe/secret

with SHA-1 hashing:

user/5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
johndoe/E5E9FA1BA31ECD1AE84F75CAAA474F3A663F05F4

Upvotes: 1

Related Questions