コード例 #1
0
ファイル: Crypto.cs プロジェクト: lulzzz/HQ.Extensions
 public static void FillRandomBytes(Span <byte> buffer, int length)
 {
     Random.NextBytes(buffer, length, RandomSource.SodiumCore);
 }
コード例 #2
0
ファイル: Crypto.cs プロジェクト: lulzzz/HQ.Extensions
 public static byte[] GetRandomBytes(int length)
 {
     return(Random.NextBytes(length, RandomSource.SodiumCore));
 }