-
Notifications
You must be signed in to change notification settings - Fork 151
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
[Added] CreateUserSeed and CreateAccountSeed so these can be generated #434
Conversation
Signed-off-by: Matthias Hanel <[email protected]>
/// Creates a private account seed String. | ||
/// </summary> | ||
/// <returns>A NATS Ed25519 Account Seed</returns> | ||
public static string CreateAccountSeed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add the others for completeness in case someone want to write a utility out of this... wdyt?
eg.
public static string CreateOperatorSeed();
public static string CreateServerSeed();
public static string CreateClusterSeed();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add CreateOperatorSeed. Server and Cluster are not used.
public class TestNkeys | ||
{ | ||
[Fact] | ||
public void TestNKEYEncodeDecode() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add seeds created by CreateUserSeed, CreateAccountSeed, etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already have TestNKEYCreateUserSeed and TestNKEYCreateAccountSeed further down, will add the operator one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far. Thanks @matthiashanel! A few requests, certainly open for discussion.
added seed generation for operator + unit test Signed-off-by: Matthias Hanel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thanks!
Signed-off-by: Matthias Hanel [email protected]
altered visibility for some functions for testing.
Since nkeys don't store the type I am not returning an NKEY and return the seed instead.
That seed can then be used to create the nkey.