zalando / go-keyring

Cross-platform keyring interface for Go
MIT License
815 stars 82 forks source link

Adding well-known prefix to encoded multiline strings #37

Closed taiidani closed 5 years ago

taiidani commented 5 years ago

Fixes #36

Adds a "well-known prefix" and hex encodes any incoming multiline string sent to Set(). Updates Get() to only decode when the well-known prefix is present.

Warning: This implementation will corrupt any existing multiline strings already in the keychain! On the plus side, it should un-corrupt any non-multiline strings that are currently being corrupted by #36.

Kudos to @jaroslaw-bochniak for the tests.

mikkeloscar commented 5 years ago

:+1:

szuecs commented 5 years ago

:+1: