示例#1
0
        public bool DeletePassword( string sessionKey, string password )
        {
            ClientSideChannel channel = new ClientSideChannel( "DiskLockerIpcChannel" );

            var message = new DeletePasswordMessage();

            message.SessionKey = sessionKey;
            message.Password = password;

            var result = ( OperationResult )channel.SendMessageAndWaitAnswer( ( uint )MessageCodes.DeletePasswordCode, message );

            return result.Value;
        }
示例#2
0
        public bool AddPathForProtection( string sessionKey, string Path, bool WeakProtection )
        {
            ClientSideChannel channel = new ClientSideChannel( "DiskLockerIpcChannel" );

            var message = new AddPathForProtectionMessage();

            message.SessionKey = sessionKey;
            message.Path = Path;
            message.WeakProtection = WeakProtection;

            var result = ( OperationResult )channel.SendMessageAndWaitAnswer( ( uint )MessageCodes.AddPathForProtectionCode, message );

            return result.Value;
        }
示例#3
0
        public bool CreateAuthSessionKey( string password, out string sessionKey  )
        {
            ClientSideChannel channel = new ClientSideChannel( "DiskLockerIpcChannel" );

            var message = new CreateAuthSessionKeyMessage();

            message.Password = password;

            var result = ( CreateAuthSessionKeyResult )channel.SendMessageAndWaitAnswer( ( uint )MessageCodes.CreateAuthSessionKeyCode, message );

            if ( result.Value )
            {
                sessionKey = result.SessionKey;
            }
            else
            {
                sessionKey = string.Empty;
            }

            return result.Value;
        }
示例#4
0
        public GetProtectedPathsResult GetProtectedPaths(string sessionKey)
        {
            ClientSideChannel channel = new ClientSideChannel( "DiskLockerIpcChannel" );

            var message = new GetProtectedPathsMessage();

            message.SessionKey = sessionKey;

            var result = ( GetProtectedPathsResult )channel.SendMessageAndWaitAnswer( ( uint )MessageCodes.GetProtectedPathsCode, message );

            return result;
        }
示例#5
0
        public bool RemovePathFromProtection( string sessionKey, uint UniqueKey )
        {
            ClientSideChannel channel = new ClientSideChannel( "DiskLockerIpcChannel" );

            var message = new RemovePathFromProtectionMessage();

            message.SessionKey = sessionKey;
            message.UniqueKey = UniqueKey;

            var result = ( OperationResult )channel.SendMessageAndWaitAnswer( ( uint )MessageCodes.RemovePathFromProtectionCode, message );

            return result.Value;
        }
示例#6
0
        public bool HasPasswords()
        {
            ClientSideChannel channel = new ClientSideChannel( "DiskLockerIpcChannel" );

            var result = ( OperationResult )channel.SendMessageAndWaitAnswer( ( uint )MessageCodes.HasPasswordsCode, null );

            return result.Value;
        }