pastabin

Crates.iopastabin
lib.rspastabin
version0.1.2
sourcesrc
created_at2023-11-15 14:35:42.394138
updated_at2023-11-15 17:07:53.891256
descriptionA pastebin clone written in Rust. Allows encrypting by returning a password string that can be passed like //
homepage
repositoryhttps://github.com/strnadchristopher/pasta-bin
max_upload_size
id1036498
size52,126
Chris Strnad (strnadchristopher)

documentation

README

Pastabin

A Pastebin clone written in Rust using the Rocket web framework. It is:

  • Fast: Rocket is one of the fastest web frameworks available for Rust.

  • Correct: No unwraps were used in the making of this program.

  • Secure: Pastas can be encrypted by calling the "newPastaSecure" endpoint. The encryption key is never stored on the server.

Usage

Start the server by building the project and running the binary. The server will listen on port 8000 by default.

Endpoints

GET /:id

Returns the contents of the pasta with the given id. If the pasta is encrypted, the encrypted string will be returned, obviously without a password

Get /:id/:password

Returns the contents of the pasta with the given id, decrypted with the given password. If the pasta is not encrypted, the password is ignored.

POST /newPasta

Creates a new pasta with the given contents. Returns the id of the new pasta.

POST /newPastaSecure

Creates a new pasta with the given contents. Returns the id of the pasta, and the encryption key in JSON format. The encryption key is never stored on the server. So if you lose it, you're sol.

Commit count: 9

cargo fmt