Skip to content

Commit

Permalink
Use RNG.Fill (#2377)
Browse files Browse the repository at this point in the history
  • Loading branch information
krwq authored Jan 31, 2025
1 parent 5767429 commit 2963944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices/Card/CreditCard/CreditCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Buffers.Binary;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using Iot.Device.Common;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -454,8 +455,7 @@ private bool FillTags()
// 0x9F37 Unpredictable number
else if (dol.TagNumber == 0x9F37)
{
var rand = new Random();
rand.NextBytes(toSend.Slice(index, dol.Data[0]));
RandomNumberGenerator.Fill(toSend.Slice(index, dol.Data[0]));
}

// Currency
Expand Down

0 comments on commit 2963944

Please sign in to comment.