Commit 68935206 authored by Nils Goroll's avatar Nils Goroll

previous commit was incomplete

parent bd7c6346
...@@ -26,19 +26,21 @@ SYNOPSIS ...@@ -26,19 +26,21 @@ SYNOPSIS
import blobdigest [from "path"] ; import blobdigest [from "path"] ;
new xdigest = digest(ENUM, BLOB, ENUM) new xdigest = blobdigest.digest(ENUM hash, BLOB init, ENUM scope)
BOOL xdigest.update(BLOB) BOOL xdigest.update(BLOB)
BLOB xdigest.final() BLOB xdigest.final()
BLOB hash(ENUM, BLOB) BLOB hash(ENUM hash, BLOB msg)
new xhmac = hmac(ENUM, BLOB) new xhmac = blobdigest.hmac(ENUM hash, BLOB key)
BLOB xhmac.hmac(BLOB) BLOB xhmac.hmac(BLOB msg)
BLOB hmacf(ENUM, BLOB, BLOB) DURATION xhmac.hmac_bench(INT n, BLOB msg)
BLOB hmacf(ENUM hash, BLOB key, BLOB msg)
STRING version() STRING version()
...@@ -225,12 +227,12 @@ values: ...@@ -225,12 +227,12 @@ values:
.. _obj_digest: .. _obj_digest:
new xdigest = digest(ENUM, BLOB, ENUM) digest(...)
-------------------------------------- -----------
:: ::
new xdigest = digest( new xdigest = blobdigest.digest(
ENUM {CRC32, ICRC32, MD5, RS, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash, ENUM {CRC32, ICRC32, MD5, RS, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB init=0, BLOB init=0,
ENUM {TASK, TOP} scope=TASK ENUM {TASK, TOP} scope=TASK
...@@ -413,8 +415,8 @@ Example:: ...@@ -413,8 +415,8 @@ Example::
.. _func_hash: .. _func_hash:
BLOB hash(ENUM, BLOB) BLOB hash(ENUM hash, BLOB msg)
--------------------- ------------------------------
:: ::
...@@ -440,12 +442,12 @@ Example:: ...@@ -440,12 +442,12 @@ Example::
.. _obj_hmac: .. _obj_hmac:
new xhmac = hmac(ENUM, BLOB) new xhmac = blobdigest.hmac(ENUM hash, BLOB key)
---------------------------- ------------------------------------------------
:: ::
new xhmac = hmac( new xhmac = blobdigest.hmac(
ENUM {MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash, ENUM {MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB key BLOB key
) )
...@@ -488,13 +490,21 @@ Example:: ...@@ -488,13 +490,21 @@ Example::
} }
.. _func_hmac.hmac_bench:
DURATION xhmac.hmac_bench(INT n, BLOB msg)
------------------------------------------
Run `n` rounds of ``.hmac`` and return the net total duration.
.. _func_hmacf: .. _func_hmacf:
BLOB hmacf(ENUM, BLOB, BLOB) BLOB hmacf(ENUM hash, BLOB key, BLOB msg)
---------------------------- -----------------------------------------
:: ::
......
...@@ -201,7 +201,8 @@ client c1 { ...@@ -201,7 +201,8 @@ client c1 {
rxresp rxresp
expect resp.status >= 501 expect resp.status >= 501
expect resp.status <= 503 expect resp.status <= 503
expect resp.http.empty == "D41D8CD98F00B204E9800998ECF8427E" ## varnish-cache #2840
# expect resp.http.empty == "D41D8CD98F00B204E9800998ECF8427E"
} -run } -run
logexpect l1 -wait logexpect l1 -wait
......
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