Commit ebc3a021 authored by Geoff Simmons's avatar Geoff Simmons

Update reformatted README.

parent 20a18423
..
.. 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)
.. _vmod_blobsha256(3):
===============
vmod_blobsha256
===============
......@@ -21,26 +19,30 @@ SHA256 digests and hmacs for the VCL blob type
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 OBJ = hmac(BLOB key)
new xhmac = blobsha256.hmac(BLOB key)
-------------------------------------
Description
Creates an object that generates HMACs based on SHA256 and the
......@@ -50,14 +52,10 @@ Example
new key = blobcode.blob(BASE64, "a2V5");
new hmac = blobsha256.hmac(key.get());
.. _func_hmac.hmac:
.. _xhmac.hmac():
hmac.hmac
---------
::
BLOB hmac.hmac(BLOB msg)
BLOB xhmac.hmac(BLOB msg)
-------------------------
Description
Returns the HMAC-SHA256 message authentication code for
......@@ -66,14 +64,10 @@ Description
Example
set req.http.hmac = hmac.hmac(blobcode.decode(BASE64, "Zm9v"));
.. _obj_blob:
blob
----
.. _blobsha256.blob():
::
new OBJ = blob(BLOB blob)
new xblob = blobsha256.blob(BLOB blob)
--------------------------------------
Description
Creates an object that returns the SHA256 digest of the given
......@@ -83,14 +77,10 @@ Example
new key = blobcode.blob(BASE64, "Zm9v");
new foo = blobsha256.blob(key.get());
.. _func_blob.hash:
blob.hash
---------
.. _xblob.hash():
::
BLOB blob.hash()
BLOB xblob.hash()
-----------------
Description
Returns the SHA256 digest for the blob given in the constructor.
......@@ -98,38 +88,26 @@ Description
Example
set req.http.X-Hash = blobcode.encode(BASE64, foo.hash());
.. _func_hashf:
.. _blobsha256.hashf():
hashf
-----
::
BLOB hashf(BLOB msg)
BLOB hashf(BLOB msg)
--------------------
Description
Returns the SHA256 digest for ``msg``.
.. _func_hmacf:
hmacf
-----
.. _blobsha256.hmacf():
::
BLOB hmacf(BLOB msg, BLOB key)
BLOB hmacf(BLOB msg, BLOB key)
------------------------------
Description
Returns the SHA256 HMAC for ``msg`` based on ``key``.
.. _func_version:
version
-------
::
.. _blobsha256.version():
STRING version()
STRING version()
----------------
Description
Returns the version string for this VMOD.
......@@ -143,6 +121,7 @@ REQUIREMENTS
This version of the VMOD requires at least Varnish 5.1. See the
project repository for versions that are compatible with other Varnish
versions.
COPYRIGHT
=========
......@@ -155,4 +134,3 @@ COPYRIGHT
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