org.freedesktop.UDisks2.Encrypted

## org.freedesktop.UDisks2.Encrypted org.freedesktop.UDisks2.Encrypted — Block device containing encrypted data |

## Methods

    Unlock           (IN  s     passphrase,
                      IN  a{sv} options,
                      OUT o     cleartext_device);
    Lock             (IN  a{sv} options);
    ChangePassphrase (IN  s     passphrase,
                      IN  s     new_passphrase,
                      IN  a{sv} options);

## Description

This interface is used for org.freedesktop.UDisks2.Block devices that contain encrypted data.

## Method Details

### The Unlock() method

    Unlock (IN  s     passphrase,
            IN  a{sv} options,
            OUT o     cleartext_device);

Tries to unlock the encrypted device using `passphrase`.

If the device in question is referenced in a system-wide configuration file (such as the `/etc/crypttab` file), then name, options and passphrase (if available) is used from that file after requesting additional authorization.

If the device is removed without being locked (e.g. the user yanking the device or pulling the media out) the cleartext device will be cleaned up.

`IN s `passphrase``: | The passphrase to use.
`IN a{sv} `options``: | Options (currently unused except for standard options).
`OUT o `cleartext_device``: | An object path to the unlocked object implementing the org.freedesktop.UDisks2.Block interface.

### The Lock() method

    Lock (IN  a{sv} options);

Locks the encrypted device.

`IN a{sv} `options``: | Options (currently unused except for standard options).

### The ChangePassphrase() method

    ChangePassphrase (IN  s     passphrase,
                      IN  s     new_passphrase,
                      IN  a{sv} options);

Changes the passphrase to `new_passphrase`. An existing passphrase is required.

If the device in question is referenced in a system-wide configuration file (such as the `/etc/crypttab` file) and this configuration references the passphrase, it is not automatically updated.

`IN s `passphrase``: | The existing passphrase.
`IN s `new_passphrase``: | The new passphrase to use.
`IN a{sv} `options``: | Options (currently unused except for standard options).