Programmatically generating .1pif files

cddude229
cddude229
Community Member
edited May 2014 in Mac

Hey guys,

As part of my own follow up to the heartbleed outage, I need to programmatically generate .pif files to distribute to team members with some new account passwords. For the most part, it doesn't look too bad, but there's a few questions I have.

1) what are the constraints on uuid? Just 32-bit hex randomly generated?
2) What hash is used for usernameHash? It appears to be sha256, but I couldn't get it to generate properly and tried a few different salting strategies using the uuid.
3) After the JSON part, I see three stars + some kind of license-like key. This matched multiple .pif files, so I assume it's something related to my 1password file.

Any help is greatly appreciated. I tried to find some existing docs, but completely failed at that.

Comments

    1. No constraints on UUID. It just has to be unique :)
    2. You should be able to ignore usernameHash and not include it without any issues.
    3. This is a separator, it is always the same. Long time ago (1Password 2?) we had issues where JSON parser would crash on some records and we had to change the format to handle each record separately.
  • cddude229
    cddude229
    Community Member

    Ah, great. Thanks for the quick reply!

  • On behalf of Roustem, you're welcome. Please let us know if you have any other questions! :)

  • MrC
    MrC
    Volunteer Moderator
    edited May 2014

    Piggy-backing this relevant thread, I'm considering changing my various wallet converter scripts to generate PIF instead of/as well as CSV, so that the import process for users can be simplified and have greater fidelity.

    Does anyone see any issues before I start coding?

    Is it safe to assume the 1PIF will be importable on both 1P4 for Mac and Windows?

  • Megan
    Megan
    1Password Alumni

    Hi @MrC,

    I'm certainly not qualified to talk much about coding issues, but I have confirmed that 1Password 4 for Windows will support .1pif import. And I've spoken to a few of our more technical gurus who tell me that this should be a fairly straightforward process.

    Simply export a Login into a text editor and map the format out. :) (I'm sure this makes more sense to you than it does to me!)

  • DBrown
    DBrown
    1Password Alumni

    The follow-up discussion about 1Password 4 for Windows continues in this thread.

This discussion has been closed.