Skip to content

Conversation

@staab
Copy link
Contributor

@staab staab commented Aug 15, 2023

nostr-protocol/nips#715

Take two, this time using a custom TLV. Note: I've never used TLVs before, so a review to make sure it's correct and idiomatic would be appreciated.

@fiatjaf
Copy link
Collaborator

fiatjaf commented Aug 15, 2023

Wait, but the NIP proposal didn't involve a TLV!

@staab
Copy link
Contributor Author

staab commented Aug 15, 2023

It does now

@staab staab force-pushed the nip44 branch 3 times, most recently from a196c6d to 8948089 Compare August 15, 2023 16:35
@staab
Copy link
Contributor Author

staab commented Aug 16, 2023

Ok, updated this, tests should be passing now.

}

const nonce = data.slice(1, 25)
const ciphertext = data.slice(25)
Copy link
Collaborator

Choose a reason for hiding this comment

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

slice is bad because it copies, subarray doesn't copy, so it's faster

@fiatjaf fiatjaf changed the title Nip44 nip44 updates Aug 16, 2023
@fiatjaf fiatjaf merged commit b92407b into nbd-wtf:master Aug 16, 2023
@staab staab deleted the nip44 branch August 16, 2023 17:28
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