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::
if (!fooprefix.update(blobcode.decode(IDENTITY, "bar"))) {
call do_error;
}
set req.http.Foobar-Hash = blocode.encode(BASE64,
fooprefix.final());
set req.http.Foobar-Hash = blobcode.encode(BASE64,
fooprefix.final());
}
sub vcl_backend_response {
......@@ -138,13 +138,13 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "baz"))) {
call do_error;
}
set req.http.Foobaz-Hash = blocode.encode(BASE64,
fooprefix.final());
set req.http.Foobaz-Hash = blobcode.encode(BASE64,
fooprefix.final());
}
sub vcl_deliver {
# 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
......@@ -162,9 +162,9 @@ and returns the result. It is functionally equivalent to using a
sub vcl_recv {
# Get the SHA256 hash of "foo"
set req.http.Foo-Hash-Functional
= blocode.encode(BASE64,
blobdigest.hash(blobcode.decode(IDENTITY,
"foo")));
= blobcode.encode(BASE64,
blobdigest.hash(blobcode.decode(IDENTITY,
"foo")));
# Same result using the object interface
if (!sha256.update(blobcode.decode(IDENTITY, "foo"))) {
......
......@@ -111,8 +111,8 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "bar"))) {
call do_error;
}
set req.http.Foobar-Hash = blocode.encode(BASE64,
fooprefix.final());
set req.http.Foobar-Hash = blobcode.encode(BASE64,
fooprefix.final());
}
sub vcl_backend_response {
......@@ -123,13 +123,13 @@ Here are some examples::
if (!fooprefix.update(blobcode.decode(IDENTITY, "baz"))) {
call do_error;
}
set req.http.Foobaz-Hash = blocode.encode(BASE64,
fooprefix.final());
set req.http.Foobaz-Hash = blobcode.encode(BASE64,
fooprefix.final());
}
sub vcl_deliver {
# 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
......@@ -147,9 +147,9 @@ and returns the result. It is functionally equivalent to using a
sub vcl_recv {
# Get the SHA256 hash of "foo"
set req.http.Foo-Hash-Functional
= blocode.encode(BASE64,
blobdigest.hash(blobcode.decode(IDENTITY,
"foo")));
= blobcode.encode(BASE64,
blobdigest.hash(blobcode.decode(IDENTITY,
"foo")));
# Same result using the object interface
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