Expand description

Library for interacting with pass managed data

Examples

Note: These examples assume that the environment variable PASSWORD_STORE_DIR is set to point to the tests/simple/ folder of this repository.

  • Retrieve a specific entry from the store

      let entry = libpass::retrieve("folder/subsecret-a").unwrap();
      assert_eq!(entry.name().unwrap(), "folder/subsecret-a");
  • Retrieve and decrypt a specific entry from the store

      use libpass::StoreEntry;
    
      match libpass::retrieve("folder/subsecret-a").unwrap() {
          StoreEntry::File(entry) => {
              assert_eq!(entry.plain_io_ro().unwrap().as_ref(), "foobar123\n".as_bytes())
          },
          _ => panic!()
      }

Modules

Different handles and utilities for working with files

Structs

An iterator that iterates over &StoreEntries contained in a directory and its subdirectories

A reference to a directory in the password store

A reference to a file in the password store

Enums

Errors that may returned by library functions

An entry in the password store

Constants

Environment variable that is interpreted when evaluating password_store_dir()

Functions

List all passwords in the password store in a flat data structure

The default password store directory.

Retrieve the stored entry identified by pass_name

Type Definitions

Custom Result that is equivalent to Result<T, PassError>.