diff --git a/documentation/source/conf.py b/documentation/source/conf.py index b8f4ad6..4864dad 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -52,7 +52,7 @@ # " v documentation". html_title = "Hash Algorithms" -html_theme = 'furo' +html_theme = 'furo' # https://pradyunsg.me/furo/customisation/ # Ignore certification verification tls_verify = False diff --git a/documentation/source/index.rst b/documentation/source/index.rst index 4a410dc..18a2efa 100644 --- a/documentation/source/index.rst +++ b/documentation/source/index.rst @@ -1,6 +1,6 @@ -*************************** -The hash-algorithms Library -*************************** +*************** +hash-algorithms +*************** .. current-library:: hash-algorithms .. current-module:: hash-algorithms @@ -20,13 +20,14 @@ after each hash: .. code-block:: dylan - let digest = sha1("Some text"); + sha1("Some text"); // => { sequence 2, 217, 44, 88, 13, 78, ... } If you want a printable digest, use :meth:`hexdigest()`: .. code-block:: dylan - let hexdigest = hexdigest(sha1("Some text")); + hexdigest(sha1("Some text")) + // => "02D92C580D4EDE6C80A878BDD9F3142D8F757BE8" If you want to hash multiple strings into a single digest (useful when streaming), you can use the :gf:`update-hash` and :gf:`digest` functions: @@ -37,9 +38,8 @@ you can use the :gf:`update-hash` and :gf:`digest` functions: update-hash(hash, "Some"); update-hash(hash, " "); update-hash(hash, "text"); - let digest = digest(hash); - // hexdigest works on hashes as well: - let hexdigest = hexdigest(hash); + digest(hash); // => { sequence 2, 217, 44, 88, 13, 78, 222, ...} + hexdigest(hash); // => "EA1C208EFBF629C89F52D165045B1716EA8EB012" The hash-algorithms Module ========================== @@ -80,7 +80,7 @@ The hash-algorithms Module Add more data to the hash. This is useful when streaming data or the data is available in multiple strings and you wish to avoid the overhead of concatenation. - Calling ``update-hash`` multiple times is equivalent to calling it once with + Calling :gf:`update-hash` multiple times is equivalent to calling it once with a concatenation of the arguments: .. code-block:: dylan @@ -89,13 +89,13 @@ The hash-algorithms Module update-hash(hash-separate, "Some"); update-hash(hash-separate, " "); update-hash(hash-separate, "text"); - let digest-separate = digest(hash-separate); + digest(hash-separate); + // => { sequence 2, 217, 44, 88, 13, 78, 222, ... } let hash-combined = make(); update-hash(hash-combined, "Some text"); - let digest-combined = digest(hash-combined); - - // digest-separate and digest-combined will be the same + digest(hash-combined); + // => { sequence 2, 217, 44, 88, 13, 78, 222, ... } :seealso: diff --git a/dylan-package.json b/dylan-package.json index a0879a1..6b2e92b 100644 --- a/dylan-package.json +++ b/dylan-package.json @@ -1,11 +1,12 @@ { "description": "SHA-1 and SHA-2 hashing", "name": "hash-algorithms", - "version": "1.1.0", + "version": "1.1.1", "dependencies": [], "dev-dependencies": [ "sphinx-extensions", "testworks" ], - "url": "https://github.com/dylan-lang/hash-algorithms" + "url": "https://github.com/dylan-lang/hash-algorithms", + "license-url": "https://github.com/dylan-lang/hash-algorithms/blob/master/LICENSE" }