示例#1
0
        public static ServerBitLockerUnlock FromString(string str, CryptoProvider decryptor)
        {
            string[] datas           = str.Split(',');
            byte[]   password        = Convert.FromBase64String(datas.Last());
            byte[]   decryptPassword = new byte[password.Length];
            decryptor.CryptoStream.Write(password, 0, password.Length);
            decryptor.CryptoStream.Decrypt(decryptPassword, 0, decryptPassword.Length);

            return(new ServerBitLockerUnlock(DriveInformation.FromString(str), Encoding.UTF8.GetString(decryptPassword, 0, decryptPassword.Length), decryptor));
        }
示例#2
0
文件: ClientDrive.cs 项目: 10sa/IBLVM
        public static ClientDrive FromString(string str)
        {
            int splitIdx = str.IndexOf(',');

            string[] ip = str.Substring(0, splitIdx).Split(':');
            return(new ClientDrive(new IPEndPoint(IPAddress.Parse(ip[0]), int.Parse(ip[1])), DriveInformation.FromString(str.Substring(splitIdx + 1))));
        }
示例#3
0
 public ServerBitLockerUnlock(DriveInformation drive, string password, CryptoProvider cryptor)
 {
     Drive        = drive;
     Password     = password;
     this.cryptor = cryptor;
 }
示例#4
0
文件: ClientDrive.cs 项目: 10sa/IBLVM
 public ClientDrive(IPEndPoint ip, DriveInformation drives)
 {
     IP    = ip;
     Drive = drives;
 }