signedsource

Crates.iosignedsource
lib.rssignedsource
version0.3.0
sourcesrc
created_at2020-12-15 16:40:30.166618
updated_at2021-11-09 20:33:31.265496
descriptionUtility for signing and verifying generated files.
homepage
repositoryhttps://github.com/adeira/universe
max_upload_size
id323204
size7,093
Martin Zlámal (mrtnzlml)

documentation

README

This packages originated from https://github.com/facebook/relay. It verifies automatically generated files and effectively prevents from manual pollution. Usage (simplified GraphQL schema snapshoting example):

// we can save a signed file
let new_snapshot = signedsource::sign_file(&format!("# {}\n\n{}", signedsource::SIGNING_TOKEN, schema))

// or verify its content
signedsource::is_signed(&old_snapshot)
signedsource::is_valid_signature(&old_snapshot)

It is also possible to re-sign file which is already signed (means update the signature when it already exists).

Commit count: 10065

cargo fmt