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)); }
public ServerBitLockerUnlock(DriveInformation drive, string password, CryptoProvider cryptor) { Drive = drive; Password = password; this.cryptor = cryptor; }
public ManagerBitLockerUnlock(ClientDrive drive, string password, CryptoProvider cryptor) { Drive = drive; Password = password; this.cryptor = cryptor; }