{"id":26063212,"url":"https://github.com/edgio/rust-ectoken","last_synced_at":"2025-04-11T11:45:47.046Z","repository":{"id":43782345,"uuid":"349167942","full_name":"Edgio/rust-ectoken","owner":"Edgio","description":"Rust implementation of ectoken","archived":false,"fork":false,"pushed_at":"2024-01-09T04:22:18.000Z","size":115,"stargazers_count":4,"open_issues_count":4,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-06T07:05:57.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Edgio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-03-18T17:50:18.000Z","updated_at":"2024-07-03T15:40:44.000Z","dependencies_parsed_at":"2023-10-10T19:06:30.830Z","dependency_job_id":null,"html_url":"https://github.com/Edgio/rust-ectoken","commit_stats":null,"previous_names":["edgecast/rust-ectoken"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Frust-ectoken","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Frust-ectoken/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Frust-ectoken/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Frust-ectoken/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Edgio","download_url":"https://codeload.github.com/Edgio/rust-ectoken/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248387958,"owners_count":21095309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-08T16:33:50.978Z","updated_at":"2025-04-11T11:45:47.018Z","avatar_url":"https://github.com/Edgio.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI](https://github.com/EdgeCast/rust-ectoken/workflows/CI/badge.svg)\n[![crates.io](https://img.shields.io/crates/v/ectoken.svg)](https://crates.io/crates/ectoken)\n[![Docs](https://docs.rs/ectoken/badge.svg)](https://docs.rs/ectoken)\n\n\u003cimg src=\"assets/edgecast_black.png\" width=\"300\"/\u003e\n\n# rust-ectoken\n\u003e _Token Generator for EdgeCast Token-Based Authentication implemented in Rust_\n\nToken-Based Authentication safeguards against hotlinking by adding a token requirement to requests for content secured by it. This token, which must be defined in the request URL's query string, defines the criteria that must be met before the requested content may be served via the CDN. This repository contains source code for a Rust implementation.\n\nWritten against Rust 2021. (Minimum rustc version 1.60.0).\n\n## Table of Contents\n\n- [Build](#Build)\n- [Test](#Test)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Build\n```\ncargo build --release\n```\n\n## Test\n```\ncargo test\n```\n\n## Usage\n\n### Library\nAdd the following to your Cargo.toml.\n```toml\n[dependencies]\nectoken = \"0.5\"\n```\n\n### CLI\n```\nTo Encrypt:\n  ec_encrypt \u003ckey\u003e \u003ctext\u003e\nor:\n  ec_encrypt encrypt \u003ckey\u003e \u003ctext\u003e\n\nTo Decrypt:\n  ec_encrypt decrypt \u003ckey\u003e \u003ctext\u003e\n```\n\n#### Example\n```rust\nuse ectoken;\n\nfn example() {\n\n    let encrypted = ectoken::encrypt_v3(\"mykey\", \"mymessage\");\n\n    let decrypted = ectoken::decrypt_v3(\"mykey\", \u0026encrypted).unwrap();\n\n    assert_eq!(\"mymessage\", decrypted);\n}\n```\n\n## Contribute\n\n- We welcome issues, questions and pull requests.\n\n\n## License\n\nThis project is licensed under the terms of the Apache 2.0 open source license. Please refer to the `LICENSE-APACHE` file for the full terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgio%2Frust-ectoken","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgio%2Frust-ectoken","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgio%2Frust-ectoken/lists"}