Commit e54dcfd5 authored by Geoff Simmons's avatar Geoff Simmons

fix a typo in the examples

parent 132f5326
Pipeline #70 skipped
...@@ -126,8 +126,8 @@ Here are some examples:: ...@@ -126,8 +126,8 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "bar"))) { if (!fooprefix.update(blobcode.decode(IDENTITY, "bar"))) {
call do_error; call do_error;
} }
set req.http.Foobar-Hash = blocode.encode(BASE64, set req.http.Foobar-Hash = blobcode.encode(BASE64,
fooprefix.final()); fooprefix.final());
} }
sub vcl_backend_response { sub vcl_backend_response {
...@@ -138,13 +138,13 @@ Here are some examples:: ...@@ -138,13 +138,13 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "baz"))) { if (!fooprefix.update(blobcode.decode(IDENTITY, "baz"))) {
call do_error; call do_error;
} }
set req.http.Foobaz-Hash = blocode.encode(BASE64, set req.http.Foobaz-Hash = blobcode.encode(BASE64,
fooprefix.final()); fooprefix.final());
} }
sub vcl_deliver { sub vcl_deliver {
# Retrieve the SHA256 hash of "foo" computed in the constructor # Retrieve the SHA256 hash of "foo" computed in the constructor
set req.http.Foo-Hash = blocode.encode(BASE64, foohash.final()); set req.http.Foo-Hash = blobcode.encode(BASE64, foohash.final());
} }
The ``hash()`` function computes the message digest for its argument The ``hash()`` function computes the message digest for its argument
...@@ -162,9 +162,9 @@ and returns the result. It is functionally equivalent to using a ...@@ -162,9 +162,9 @@ and returns the result. It is functionally equivalent to using a
sub vcl_recv { sub vcl_recv {
# Get the SHA256 hash of "foo" # Get the SHA256 hash of "foo"
set req.http.Foo-Hash-Functional set req.http.Foo-Hash-Functional
= blocode.encode(BASE64, = blobcode.encode(BASE64,
blobdigest.hash(blobcode.decode(IDENTITY, blobdigest.hash(blobcode.decode(IDENTITY,
"foo"))); "foo")));
# Same result using the object interface # Same result using the object interface
if (!sha256.update(blobcode.decode(IDENTITY, "foo"))) { if (!sha256.update(blobcode.decode(IDENTITY, "foo"))) {
......
...@@ -111,8 +111,8 @@ Here are some examples:: ...@@ -111,8 +111,8 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "bar"))) { if (!fooprefix.update(blobcode.decode(IDENTITY, "bar"))) {
call do_error; call do_error;
} }
set req.http.Foobar-Hash = blocode.encode(BASE64, set req.http.Foobar-Hash = blobcode.encode(BASE64,
fooprefix.final()); fooprefix.final());
} }
sub vcl_backend_response { sub vcl_backend_response {
...@@ -123,13 +123,13 @@ Here are some examples:: ...@@ -123,13 +123,13 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "baz"))) { if (!fooprefix.update(blobcode.decode(IDENTITY, "baz"))) {
call do_error; call do_error;
} }
set req.http.Foobaz-Hash = blocode.encode(BASE64, set req.http.Foobaz-Hash = blobcode.encode(BASE64,
fooprefix.final()); fooprefix.final());
} }
sub vcl_deliver { sub vcl_deliver {
# Retrieve the SHA256 hash of "foo" computed in the constructor # Retrieve the SHA256 hash of "foo" computed in the constructor
set req.http.Foo-Hash = blocode.encode(BASE64, foohash.final()); set req.http.Foo-Hash = blobcode.encode(BASE64, foohash.final());
} }
The ``hash()`` function computes the message digest for its argument The ``hash()`` function computes the message digest for its argument
...@@ -147,9 +147,9 @@ and returns the result. It is functionally equivalent to using a ...@@ -147,9 +147,9 @@ and returns the result. It is functionally equivalent to using a
sub vcl_recv { sub vcl_recv {
# Get the SHA256 hash of "foo" # Get the SHA256 hash of "foo"
set req.http.Foo-Hash-Functional set req.http.Foo-Hash-Functional
= blocode.encode(BASE64, = blobcode.encode(BASE64,
blobdigest.hash(blobcode.decode(IDENTITY, blobdigest.hash(blobcode.decode(IDENTITY,
"foo"))); "foo")));
# Same result using the object interface # Same result using the object interface
if (!sha256.update(blobcode.decode(IDENTITY, "foo"))) { if (!sha256.update(blobcode.decode(IDENTITY, "foo"))) {
......
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