From 194991f3b15bebcc1517b52c911383162d8c1ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20J=C3=B6rg=20Schmidt?= Date: Sun, 6 Mar 2022 21:36:15 +0100 Subject: [PATCH] docs: further doc improvements --- CHANGELOG | 3 +++ Cargo.toml | 2 +- README.md | 6 +++--- src/lib.rs | 17 +++++++++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6001296..0c7d12c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +## v1.0.4 - Docs Improved II +Further improved documentation + ## v1.0.3 - Docs Improved More examples diff --git a/Cargo.toml b/Cargo.toml index 15dfe7b..9974447 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "webcryptobox" description = "Convenient wrappers around OpenSSL to use WebCrypto compatible cryptography." -version = "1.0.3" +version = "1.0.4" edition = "2021" documentation = "https://docs.rs/webcryptobox/latest/webcryptobox/" homepage = "https://github.com/jo/webcryptobox-rs" diff --git a/README.md b/README.md index f4cda82..1f504b2 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Webcryptobox -Webcryptobox provides convenient wrappers around OpenSSL to use WebCrypto compatible cryptography. +Convenient wrappers around [OpenSSL](https://docs.rs/openssl/latest/openssl/) to use [WebCrypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) compatible cryptography. It works nicely together with the [JavaScript Webcryptobox](https://github.com/jo/webcryptobox-js) and [Bash Webcryptobox](https://github.com/jo/webcryptobox-sh). -Webcryptobox provides functions for elliptic curve key generation, derivation, import and export as well as AES encryption and decryption. +Webcryptobox is **both a library and a little command line interface.** It helps with elliptic curve key generation, derivation, fingerprinting, import and export as well as AES encryption and decryption. -Webcryptobox comes with both a library and a little command line interface. For the library documentation, see [docs.rs/webcryptobox](https://docs.rs/webcryptobox/latest/webcryptobox/). In the following I describe the CLI usage. +For the library documentation, see [docs.rs/webcryptobox](https://docs.rs/webcryptobox/latest/webcryptobox/). In the following I describe the CLI usage. ## Installation Clone the project, compile it and use the binary: diff --git a/src/lib.rs b/src/lib.rs index 91ae06a..de49e1b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,16 @@ -//! Webcryptobox provides convenient wrappers around OpenSSL to use WebCrypto compatible +#![warn(missing_docs)] +#![warn(rustdoc::missing_doc_code_examples)] + +//! Webcryptobox provides convenient wrappers around +//! [OpenSSL](https://docs.rs/openssl/latest/openssl/) to use +//! [WebCrypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) compatible //! cryptography. //! -//! It works nicely together with the [JavaScript Webcryptobox](https://github.com/jo/webcryptobox-js). +//! It works nicely together with the [JavaScript +//! Webcryptobox](https://github.com/jo/webcryptobox-js) and [Bash +//! Webcryptobox](https://github.com/jo/webcryptobox-sh). //! -//! Webcryptobox provides functions for elliptic curve key generation, derivation, import and +//! Webcryptobox helps with elliptic curve key generation, derivation, fingerprinting, import and //! export as well as AES encryption and decryption. use openssl::derive::Deriver; @@ -16,9 +23,11 @@ use openssl::rand::rand_bytes; use openssl::sha; use openssl::symm; +// Length of the AEAD tag used in GCM mode const AEAD_TAG_LENGTH: usize = 16; -/// Holds cipher configuration and provides the methods for dancing with elliptic curves and advanced encryption. +/// Holds cipher configuration and provides the methods for dancing with elliptic curves and +/// advanced encryption. /// /// Use the factories [`webcryptobox::Webcryptobox::new`] or /// [`webcryptobox::Webcryptobox::default`] to instantiate a Webcryptobox: