Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keys.DecodeSaltpackKey not available anymore #165

Open
shoce opened this issue Nov 5, 2021 · 4 comments
Open

keys.DecodeSaltpackKey not available anymore #165

shoce opened this issue Nov 5, 2021 · 4 comments

Comments

@shoce
Copy link

shoce commented Nov 5, 2021

How to decode saltpack keys now without that function? Can u please help me?

@gabriel
Copy link
Contributor

gabriel commented Nov 6, 2021

Is it now in the api package? api.DecodeKey?

https://github.com/keys-pub/keys/blob/master/api/encode_test.go

@shoce
Copy link
Author

shoce commented Nov 7, 2021

Is it now in the api package? api.DecodeKey?

https://github.com/keys-pub/keys/blob/master/api/encode_test.go

Oh ok. Thanks.

Got into another trouble now while updating my code using this lib.

Is it on purpose that keys/api/Key does not implement keys/Key interface?

@gabriel
Copy link
Contributor

gabriel commented Nov 8, 2021

api.Key is in a generic, serializable form for use with msgpack, JSON, sqlite database, etc.

But you can call key.As() or key.AsPublic() to get the concrete type which does implement keys.Key.

@gabriel
Copy link
Contributor

gabriel commented Nov 8, 2021

See https://github.com/keys-pub/keys/blob/master/api/as.go

I should document all this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants