Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobdigest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blobdigest
Commits
710b25d7
Commit
710b25d7
authored
Mar 05, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update auto-generated readme
parent
979d8865
Pipeline
#427
skipped
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
52 deletions
+72
-52
README.rst
README.rst
+72
-52
No files found.
README.rst
View file @
710b25d7
...
...
@@ -21,7 +21,29 @@ digests, checksums and hmacs for the VCL blob type
SYNOPSIS
========
import blobdigest [from "path"] ;
::
import blobdigest [from "path"] ;
new xdigest = digest(ENUM, BLOB, ENUM)
BOOL xdigest.update(BLOB)
BLOB xdigest.final()
BLOB hash(ENUM, BLOB)
new xhmac = hmac(ENUM, BLOB)
BLOB xhmac.hmac(BLOB)
BLOB hmacf(ENUM, BLOB, BLOB)
STRING version()
BLOB uint32blob(INT)
::
...
...
@@ -202,24 +224,19 @@ values:
* ``SHA3_384``
* ``SHA3_512``
CONTENTS
========
* digest(ENUM {CRC32,ICRC32,MD5,RS,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512}, BLOB, ENUM {TASK,TOP})
* BLOB hash(ENUM {CRC32,ICRC32,MD5,RS,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512}, BLOB)
* hmac(ENUM {MD5,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512}, BLOB)
* BLOB hmacf(ENUM {MD5,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512}, BLOB, BLOB)
* STRING version()
* BLOB _uint32blob(INT)
.. _obj_digest:
digest
------
new xdigest = digest(ENUM, BLOB, ENUM)
------
--------------------------------
::
new OBJ = digest(ENUM {CRC32,ICRC32,MD5,RS,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512} hash, BLOB init=0, ENUM {TASK,TOP} scope=TASK)
new xdigest = digest(
ENUM {CRC32, ICRC32, MD5, RS, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB init=0,
ENUM {TASK, TOP} scope=TASK
)
Initialize a message digest context for the algorithm ``hash``, and
optionally update it with ``init``. If ``init`` is left out, then an
...
...
@@ -253,12 +270,8 @@ Example::
.. _func_digest.update:
digest.update
-------------
::
BOOL digest.update(BLOB)
BOOL xdigest.update(BLOB)
-------------------------
Incrementally add the BLOB to the digest context of this object.
Returns ``true`` if and only if the operation was successful.
...
...
@@ -311,14 +324,11 @@ Example::
call do_backend_error;
}
.. _func_digest.final:
digest.final
------------
::
.. _func_digest.final:
BLOB digest.final()
BLOB xdigest.final()
--------------------
Finalize the message digest and return the result.
...
...
@@ -399,14 +409,21 @@ Example::
# Baz-Hash-Base64: base64-encoded SHA3_256 hash of "baz"
# Baz-Hash-Hex: hex-encoded SHA3_256 hash of "bar"
.. _func_hash:
hash
----
BLOB hash(ENUM, BLOB)
----
-----------------
::
BLOB hash(ENUM {CRC32,ICRC32,MD5,RS,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512} hash, BLOB msg)
BLOB hash(
ENUM {CRC32, ICRC32, MD5, RS, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB msg
)
Returns the message digest for ``msg`` as specified by ``hash``.
...
...
@@ -422,14 +439,18 @@ Example::
blobdigest.hash(SHA256,
blob.decode(decoding=BASE64, encoded="Zm9v"));
.. _obj_hmac:
hmac
----
new xhmac = hmac(ENUM, BLOB)
----
------------------------
::
new OBJ = hmac(ENUM {MD5,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512} hash, BLOB key)
new xhmac = hmac(
ENUM {MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB key
)
Creates an object that generates HMACs based on the digest algorithm
``hash`` and the given ``key``.
...
...
@@ -448,12 +469,8 @@ Example::
.. _func_hmac.hmac:
hmac.hmac
---------
::
BLOB hmac.hmac(BLOB msg)
BLOB xhmac.hmac(BLOB msg)
-------------------------
Returns the HMAC for ``msg`` based on the key and hash algorithm
provided in the constructor.
...
...
@@ -472,14 +489,22 @@ Example::
return(synth(401));
}
.. _func_hmacf:
hmacf
-----
BLOB hmacf(ENUM, BLOB, BLOB)
-----
-----------------------
::
BLOB hmacf(ENUM {MD5,SHA1,SHA224,SHA256,SHA384,SHA512,SHA3_224,SHA3_256,SHA3_384,SHA3_512} hash, BLOB key, BLOB msg)
BLOB hmacf(
ENUM {MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB key,
BLOB msg
)
Returns the HMAC for ``msg`` as specified by ``hash`` and the ``key``.
...
...
@@ -507,14 +532,11 @@ Example::
blob.decode(encoded=
req.http.Msg)));
.. _func_version:
version
-------
::
.. _func_version:
STRING version()
STRING version()
----------------
Returns the version string for this VMOD.
...
...
@@ -522,14 +544,11 @@ Example::
std.log("Using VMOD blobdigest version " + blobdigest.version());
.. _func__uint32blob:
_uint32blob
-----------
.. _func_uint32blob:
::
BLOB _uint32blob(INT)
BLOB uint32blob(INT)
--------------------
Intentionally undocumented, transitional helper only
...
...
@@ -588,6 +607,7 @@ SEE ALSO
* https://github.com/rhash/RHash
* http://rhash.anz.ru/
COPYRIGHT
=========
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment