1 unstable release

Uses old Rust 2015

0.1.3 Sep 20, 2021

#106 in #reader-writer

22 downloads per month

Unlicense

28KB
584 lines

pwsafe

A Rust library for reading and writing Password Safe databases.

Updated version of pwsafe. Fixed dependancy issues due to yanked crate block-cipher-trait. PwsafeReader decrypts the whole psafe3 file in the new method and PwsafeWriter encrypts and writes fields on call to finish. This was done because block-modes consumes the BlockMode instance when calling encrypt and decrypt.


lib.rs:

Password Safe file format reader and writer.

This crate provides separate reader and writer for Password Safe database format. It does not impose any internal database representation and can be used to write converters or integrate import/export functionality into existing password managers.

Neither reader nor writer require std::io::Seek trait implementation from the underlying reader or writer. That is because by design the Password Safe database does not allow random access. Blocks are encrypted in CBC mode and checking the database integrity requires reading the whole file. On the other hand, the database must be rekeyed after each modification, so the whole file must be rewritten from scratch.

At this time only version 3 database format is supported.

High-level interfaces to parse records are not implemented (yet).

Dependencies

~1MB
~20K SLoC