summaryrefslogtreecommitdiff
path: root/WinKeyRecover/KeyChecker/GetString.cs
blob: bad8722aa0ba35951023e417828ebfa97bb4754e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinKeyRecover
{
    internal class GetString
    {
        public string Get(byte[] bytes, int index)
        {
            int num = index;

            while (bytes[num] != 0 || bytes[num + 1] != 0)
            {
                num++;
            }

            return Encoding.ASCII.GetString(bytes, index, num - index).Replace("\0", "");
        }
    }
}