9 unstable releases (3 breaking)

0.4.0 Jun 30, 2022
0.3.0 Jun 18, 2022
0.2.0 Jun 17, 2022
0.1.5 Jun 16, 2022

#2375 in Cryptography


Used in kustomize-pass

MIT and LGPL-2.1

39KB
636 lines

libpass-rs

crates.io version Docs Maintenance Status

A library for interacting with pass managed data

Pass is a password manager popular on unix systems because of its simple design and ease of use. This library exists to further simplify interactions with a password store that is managed by pass by exposing common interactions as safe rust functions.

Roadmap

This library is currently very minimal and only supports the features that I needed for my own use cases. Additional features are planned to support most reasonable use cases.

In detail, the following describes the state of each feature:

  • Initializing a password store or a subfolder of an existing password store with a set of given keys While doing so, also re-encrypt all stored passwords for the given and only the given keys.
  • Listing contents of a password store
  • Retrieving information about a certain entry in a password store
  • Retrieving the content of an encrypted entry (meaning the actual password)
  • Searching inside all decrypted files for a given string
  • Updating the content of a given entry
  • Generating a new password and save it
  • Removing a given entry from the store (whole directories as well as single files)
  • Moving a given entry to a new location in the store, re-encrypting it if the new destination necessitates it
  • Copying a given entry to another location, re-encrypting it if the new destination necessitates it

Note: Most of these feature descriptions mirror how pass itself behaves during these operations (See pass documentation).

Installation and Usage

This library can be used like any other rust library. Check its crates.io page and documentation at docs.rs. Examples are also available in the documentation.

This means that you should depend on this library via your Cargo.toml like this:

[dependencies]
libpass = "*"   # or a more specific version

Additionally, we depend on gpgme-rs which require the gpgme library and its development files (e.g., headers, gpgme-config) to be installed during the build process which you should install using your operating systems package manager.

Dependencies

~1.2–2.2MB
~42K SLoC