Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions SnappyWinscard/CardIo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private string ReaderName
}


public string GetCardUID()//only for mifare 1k cards
public string GetCardUID(int cardUidLength = 8) //only for mifare 1k cards
{
if (ConnectCard())
{
Expand All @@ -182,8 +182,9 @@ private string ReaderName
nint outBytes = receivedUID.Length;
if (SCardTransmit(sendBytes, receivedUID, ref request, ref outBytes))
{
var cardUidByteSize = cardUidLength / 2;
cardUID = receivedUID
.Take(4)
.Take(cardUidByteSize)
.Aggregate(
"",
(a, b)
Expand Down