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

Add nip44 encrypt/decrypt example to demo project #204

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

fabianfabian
Copy link
Contributor

I added an example for encrypting/decrypting with nip44 to the demo project, I was using this myself to help me understand but might be useful for others too.

I copied the style from LegacyDirectMessageDemoView but limited it to encrypt/decrypt, no publishing to relays.

Copy link
Contributor

@tyiu tyiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I confirmed that it works by:

  1. Encrypting a message with public key A, private key B
  2. Decrypting the encrypted message with public key A and private key B
  3. Decrypting the encrypted message with public key B and private key A

Thanks for the contribution!

@tyiu tyiu merged commit 85c4274 into nostr-sdk:main Jan 5, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants