You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are we supposed to generate a KeyPair when we only have the secretKey stored locally? In the past, we used that constructor (KeyPair(byte[] secretKey)) which is now gone. We can of course subclass this class and put it back (copying all the other code as well) but it's not really ideal.
Also, your other constructor's first argument now has a confusing/wrong name:
public KeyPair(String secretKey, Encoder encoder) {
this(encoder.decode(secretKey));
}
That String secretKey argument is now actually a seed, because it calls the KeyPair(byte[] seed) constructor.
How did you envision this upgrade path scenario from old clients using the KeyPair(byte[] secretKey) constructor? (clients that have already stored that key)
Perhaps you can add that constructor back, or add it as a static factory method (or find some other workaround for the fact they have the same signature).
The text was updated successfully, but these errors were encountered:
After migrating our code from kalium to libsodium-jni, it's no longer possible to generate a
KeyPair
from abyte[] secretKey
.See also this change:
This constructor was commented out:
How are we supposed to generate a
KeyPair
when we only have the secretKey stored locally? In the past, we used that constructor (KeyPair(byte[] secretKey)
) which is now gone. We can of course subclass this class and put it back (copying all the other code as well) but it's not really ideal.Also, your other constructor's first argument now has a confusing/wrong name:
That
String secretKey
argument is now actually a seed, because it calls theKeyPair(byte[] seed)
constructor.How did you envision this upgrade path scenario from old clients using the
KeyPair(byte[] secretKey)
constructor? (clients that have already stored that key)Perhaps you can add that constructor back, or add it as a static factory method (or find some other workaround for the fact they have the same signature).
The text was updated successfully, but these errors were encountered: