Commit ebc3a021 authored by Geoff Simmons's avatar Geoff Simmons

Update reformatted README.

parent 20a18423
.. ..
.. NB: This file is machine generated, DO NOT EDIT! .. NB: This file is machine generated, DO NOT EDIT!
.. ..
.. Edit vmod.vcc and run make instead .. Edit ../src/vmod_blobsha256.vcc and run make instead
.. ..
.. role:: ref(emphasis) .. role:: ref(emphasis)
.. _vmod_blobsha256(3):
=============== ===============
vmod_blobsha256 vmod_blobsha256
=============== ===============
...@@ -21,26 +19,30 @@ SHA256 digests and hmacs for the VCL blob type ...@@ -21,26 +19,30 @@ SHA256 digests and hmacs for the VCL blob type
SYNOPSIS SYNOPSIS
======== ========
import blobsha256 [from "path"] ; .. parsed-literal::
CONTENTS import blobsha256 [as name] [from "path"]
========
new xhmac = blobsha256.hmac(BLOB key)
BLOB xhmac.hmac(BLOB msg)
new xblob = blobsha256.blob(BLOB blob)
BLOB xblob.hash()
BLOB hashf(BLOB msg)
BLOB hmacf(BLOB msg, BLOB key)
STRING version()
* hmac(BLOB)
* blob(BLOB)
* BLOB hashf(BLOB)
* BLOB hmacf(BLOB, BLOB)
* STRING version()
.. _obj_hmac: .. _blobsha256.hmac():
hmac new xhmac = blobsha256.hmac(BLOB key)
---- -------------------------------------
::
new OBJ = hmac(BLOB key)
Description Description
Creates an object that generates HMACs based on SHA256 and the Creates an object that generates HMACs based on SHA256 and the
...@@ -50,14 +52,10 @@ Example ...@@ -50,14 +52,10 @@ Example
new key = blobcode.blob(BASE64, "a2V5"); new key = blobcode.blob(BASE64, "a2V5");
new hmac = blobsha256.hmac(key.get()); new hmac = blobsha256.hmac(key.get());
.. _func_hmac.hmac: .. _xhmac.hmac():
hmac.hmac BLOB xhmac.hmac(BLOB msg)
--------- -------------------------
::
BLOB hmac.hmac(BLOB msg)
Description Description
Returns the HMAC-SHA256 message authentication code for Returns the HMAC-SHA256 message authentication code for
...@@ -66,14 +64,10 @@ Description ...@@ -66,14 +64,10 @@ Description
Example Example
set req.http.hmac = hmac.hmac(blobcode.decode(BASE64, "Zm9v")); set req.http.hmac = hmac.hmac(blobcode.decode(BASE64, "Zm9v"));
.. _obj_blob: .. _blobsha256.blob():
blob
----
:: new xblob = blobsha256.blob(BLOB blob)
--------------------------------------
new OBJ = blob(BLOB blob)
Description Description
Creates an object that returns the SHA256 digest of the given Creates an object that returns the SHA256 digest of the given
...@@ -83,14 +77,10 @@ Example ...@@ -83,14 +77,10 @@ Example
new key = blobcode.blob(BASE64, "Zm9v"); new key = blobcode.blob(BASE64, "Zm9v");
new foo = blobsha256.blob(key.get()); new foo = blobsha256.blob(key.get());
.. _func_blob.hash: .. _xblob.hash():
blob.hash
---------
:: BLOB xblob.hash()
-----------------
BLOB blob.hash()
Description Description
Returns the SHA256 digest for the blob given in the constructor. Returns the SHA256 digest for the blob given in the constructor.
...@@ -98,38 +88,26 @@ Description ...@@ -98,38 +88,26 @@ Description
Example Example
set req.http.X-Hash = blobcode.encode(BASE64, foo.hash()); set req.http.X-Hash = blobcode.encode(BASE64, foo.hash());
.. _func_hashf: .. _blobsha256.hashf():
hashf BLOB hashf(BLOB msg)
----- --------------------
::
BLOB hashf(BLOB msg)
Description Description
Returns the SHA256 digest for ``msg``. Returns the SHA256 digest for ``msg``.
.. _func_hmacf: .. _blobsha256.hmacf():
hmacf
-----
:: BLOB hmacf(BLOB msg, BLOB key)
------------------------------
BLOB hmacf(BLOB msg, BLOB key)
Description Description
Returns the SHA256 HMAC for ``msg`` based on ``key``. Returns the SHA256 HMAC for ``msg`` based on ``key``.
.. _func_version: .. _blobsha256.version():
version
-------
::
STRING version() STRING version()
----------------
Description Description
Returns the version string for this VMOD. Returns the version string for this VMOD.
...@@ -143,6 +121,7 @@ REQUIREMENTS ...@@ -143,6 +121,7 @@ REQUIREMENTS
This version of the VMOD requires at least Varnish 5.1. See the This version of the VMOD requires at least Varnish 5.1. See the
project repository for versions that are compatible with other Varnish project repository for versions that are compatible with other Varnish
versions. versions.
COPYRIGHT COPYRIGHT
========= =========
...@@ -155,4 +134,3 @@ COPYRIGHT ...@@ -155,4 +134,3 @@ COPYRIGHT
See LICENSE See LICENSE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment