using System;
using System.Security.Cryptography;
using System.Text;
namespace ConsoleApp12
{
class Program
{
const int SIZE = 17;
static void Main(string[] args)
{
Console.WriteLine("Введите начало последовательности: ");
var source = Console.ReadLine();
var randomString = GenerateNumbers(SIZE - source.Length);
var result = $"{source}{randomString}";
Console.WriteLine(result);
Console.ReadKey();
}
static string GenerateNumbers(int len)
{
if (len <= 0) return "";
using var crypto = new RNGCryptoServiceProvider();
Span<byte> buffer = stackalloc byte[len];
crypto.GetBytes(buffer);
var sb = new StringBuilder(len);
foreach (var item in buffer)
{
sb.Append(item % 10);
}
return sb.ToString();
}
}
}