keys-pub/keys

`keys.DecodeSaltpackKey` not available anymore

shoce opened this issue · 4 comments

shoce commented

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

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

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

shoce commented

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?

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.

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

I should document all this stuff.