.1pif format questions

  1. When importing .1pif data, will the import process generate the keyID, UUID and various hashes, or do I need to generate them when creating the .1pif file?
  2. If I need to generate the hashes, what algorithms are used, over what data? I notice that usernameHash is 256 bits but contentsHash is only 32 bits. I tried SHA256 on the username but it did not produce the same value as the one in the .1pif file.
  3. createdAt and updatedAt look like UNIX timestamps (epoch 1/1/1970) with second resolution. Correct?
  4. In the .1pif file each entry is separated from the next by a line containing three asterisks, a UUID and three asterisks. The UUID is the same in each delimiter line. What is this and how do I generate it?

Comments

  • MrC
    MrC
    Volunteer Moderator
    edited December 2014

    Take a look at the file Utils/1PIF.pm in my convert_to_1p4 package. It will reveal what you need to export to a 1PIF so that your data can be imported. It is much more complicated that you might be anticipating, due to backwards-compatibility with older 1Password versions.

    You need to generate the UUID; no hashes or keyIDs are necessary.

    Several timestamps are in Unix epoch time; you've noticed two of them. The %pif_table table in the 1PIF.pm file will show you the others - search $k_date. Some dates are stored as $k_monthYear values (which are curiously stored as YYYYMM strings).

    Just use the same UUID separator I have in the 1PIF.pm file (search for ***5642bee8).

    ps. did you try the 1.01 update I referred you to?

  • jimgarrison
    jimgarrison
    Community Member

    I have downloaded the updated version and will try it first (before embarking on writing an XSLT stylesheet).

  • MrC
    MrC
    Volunteer Moderator

    Ok, cool. Please note that I updated the _testing version's contents about an hour ago, and promoted that updated package to the released version. Your _testing version may be out of date, so just update with the version on the main page.

This discussion has been closed.