CozeJS | t | |
---|---|---|
8 | 3 | |
5 | - | |
- | - | |
4.5 | - | |
about 2 months ago | - | |
JavaScript | ||
BSD 3-clause "New" or "Revised" License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
CozeJS
-
Introducing Coze - a cryptographic JSON messaging specification
Coze is open source under the BSD 3 license and has a reference implementation is written in Go. There's also a Javascript implementation and a CLI library.
-
Show HN: Coze – cryptographic JSON messaging specification
We've also published a [Javascript implementation of Coze](https://github.com/Cyphrme/CozeJS) and a [CLI library](https://github.com/Cyphrme/CozeCLI).
We hope you enjoy!
# What is Coze useful for?
-
Coze: a cryptographic JSON messaging specification designed for human readability
We've also published a Javascript implementation of Coze and a CLI library.
-
How to store your app's entire state in the url
https://convert.zamicol.com/#?inAlph=Text&in=Hello%20world!&...
https://cyphr.me/ed25519_applet/ed.html#?msg=Hello%20World!&...
https://cyphr.me/coze?verify&input={%22pay%22:{%22alg%22:%22...
- Hi , I'm using laravel as an api with react js and I want to implement JWT in my project. I heard about laravel passport, sanctum and other libraries like jwt-auth ? I don't know which one is better and what do you recommend?
- Cyphrme/Cozejs: Coze Javascript
-
Apple, Google, and Microsoft commit to expanded support for FIDO standard
Hello, it's me again.
We just made public the java script implementation of Coze.
https://github.com/Cyphrme/cozejs.
t
-
How to store your app's entire state in the url
Yep, it is! You can find the sources on GitLab[0]. The compression is done using brotli-wasm[1].
The entry point to the compression is the syncCompress[2] function, which converts the data to UTF-8, adds the needed header bytes, and then compresses using brotli-wasm. Decompression is done in a streaming way in streamDecompress[3]. This is to avoid zip bomb attacks, where even a short URL could decompress to gigabytes of data, locking the browser. Thankfully brotli-wasm had streaming decompression builtin, I just had to write the wrapper code to update the text content and the status bar in the UI.
You can find the brotli-wasm code I'm using in the vendor folder[4], there is a JS wrapper and then the WASM code (both are straight from brotli-wasm).
[0] https://gitlab.com/Nicd/t
-
I made a pastebin that stores its contents in the URL
[0] https://gitlab.com/Nicd/t
-
Show HN: I made a pastebin that stores its contents in the URL
So I've been having a fever for this week, which turned out to be COVID. Due to that I've had a lot of time to sit around and watch TV, but also type out some silly code. In a Discord server I frequent a person wondered if it would be possible to create an anonymous pastebin that stored the contents in the URL and not on the server. I got excited to test it out and Tahnaroskakori (Finnish for the very literal translation of "pastebin") was born.
Naturally it's open source[0], and it has followed the typical trajectory of a quick hack project: it started as a clean, tiny implementation, and then adding line numbers and syntax highlighting ballooned it into a more messy state. The most challenging part was dynamically loading Prism.js highlighting when the library itself doesn't have ES module support, and I didn't want to set up a bundler tool or NPM.
Technically speaking, the pastebin contents are converted into UTF-8 bytes, then compressed using brotli, and finally encoded to the hash of the URL using a base-something alphabet. I removed some technically hash safe characters because linkifiers tend to cut off links when they encounter some of them, like ")". There is a small extensible header tacked to the front before compression, it contains the selected language for now but could contain more in the future. Though the only feature I've thought of is setting the starting line number.
URLs have a generally accepted character limit of 2048 characters (to my knowledge), so that's what is the limit for the paste. You can't really say what amount of input that corresponds to due to the brotli compression, but there are some numbers on the bottom of the page that try to help you estimate. I find it interesting to just type things and see how it affects the output length. Sometimes _adding_ a word or even a comma can cut several characters off the URL length! At very small inputs, the compressed size is bigger than the original size, making it just put the content in the URL uncompressed would be an improvement there.
If you can break or XSS it, I would be glad to know. :) I think I'll use this for my own pastebin purposes simply because it's fun and fast (and I don't need an account to use it). I don't expect it to become widely used, but I'll keep it on the GitLab page and promise not to break the hash format anymore (which is now possible to avoid thanks to the extensible header part).
I've tested it on Vivaldi, Safari, and Firefox on macOS, and quickly on Vivaldi in Android. If you have problems with it on some browser/OS, please file an issue or even better a PR. A very recent browser version is required due to usage of TransformStream[1].
[0] https://gitlab.com/Nicd/t
What are some alternatives?
rust-u2f - U2F security token emulator written in Rust
sveltekit-search-params - The easiest way to read and WRITE from query parameters in sveltekit.
calculang - calculang is a language for calculations 🧮💬👩💻
box-line-text - Simple virtual whiteboarding
u - μ is a JavaScript library for encoding/decoding state (JavaScript object) in URL
xstate - Actor-based state management & orchestration for complex app logic.
brotli-wasm - A reliable compressor and decompressor for Brotli, supporting node & browsers via wasm
urltron - Stringify and parse json as url query paramaters
CozeCLI - Coze CLI
pastml
compress-json - Store JSON data in space efficient manner