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

Samples?? #1

Open
WrongBit opened this issue Nov 18, 2019 · 2 comments
Open

Samples?? #1

WrongBit opened this issue Nov 18, 2019 · 2 comments

Comments

@WrongBit
Copy link

Guys, you just drop the lib in the wild? Did you mind to support it with any meaningful samples? Hardly it's easy to dig in your API to discover what to do.

@sajagi
Copy link
Contributor

sajagi commented Nov 18, 2019

Hi WrongBit,

These plugins are meant to be used with Rebex libraries. If you're looking for a standalone cryptographic library for C# I suggest you take a look at Bouncy Castle project.

@WrongBit
Copy link
Author

Thanks, @sajagi ! Didn't catch why your library should be used with something else. I play a bit with API and library works! :) Hardly I need that heavy 'Castle'. Just in case my sample:

// Signer
var ed = new Ed25519();
ed.FromPrivateKey(File.ReadAllBytes(SomeFileWithPrivateKey));
var sign = ed.SignMessage(msgBytes);

// Verifier
var ed = new Ed25519();
ed.FromPublicKey(File.ReadAllBytes(SomeFileWithPublicKey));
ed.VerifyMessage(msgBytes, sign)

// Key generation
var priv_key = ed.GetPrivateKey();
var pub_key = ed.GetPublicKey();

That's it! One simple example and job is done in 1 min.

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