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

Bencode implementation #13

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Bencode implementation #13

merged 1 commit into from
Feb 9, 2024

Conversation

amika-sq
Copy link
Contributor

@amika-sq amika-sq commented Feb 9, 2024

did:dht requires bencode to encode/decode Bep44 messages.

I was able to find a few open source Swift packages that could decode a bencoded string, but none that could encode it. So, this PR implements our own implementation that covers both operations, as well as adding a convenience encodeAsBytes.

@amika-sq amika-sq enabled auto-merge (squash) February 9, 2024 20:43
@amika-sq amika-sq merged commit abedb7e into main Feb 9, 2024
1 check passed
@amika-sq amika-sq deleted the bencode branch February 9, 2024 20:48
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.

None yet

1 participant