Skip to content

Conversation

@dnechay
Copy link
Collaborator

@dnechay dnechay commented Oct 31, 2024

Description

Encryption module now works with binaries

Summary of changes

  1. Both signAndEncrypt and sign methods now accept not only string, but also Uint8Array (or Buffer, which is subclass of it), so we can properly works with some small files. In case we need something relatively big (e.g. >10Mb) - we will probably need to start supporting streams. We can see how it goes with performance over time
  2. decrypt method now always returns Uint8Array, so consumer of this API must know what to expect and how to process decrypted value

How test the changes

  • Unit tests
  • /example/encrypt.ts file added

Related issues

Part of the #2717

@vercel
Copy link

vercel bot commented Oct 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
human-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 0:00am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
faucet-frontend ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 0:00am
faucet-server ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 0:00am
human-dashboard-frontend ⬜️ Skipped (Inspect) Nov 4, 2024 0:00am

@dnechay dnechay merged commit 8e0e916 into develop Nov 5, 2024
22 checks passed
@dnechay dnechay deleted the dnechay/2717 branch November 5, 2024 13:43
@dnechay dnechay self-assigned this Mar 12, 2025
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.

[SDK] Treat messages/files for encryption/decryption as binaries not strings

4 participants