add support for v2 hashing algorithm.
update README.md and demo file to be more in sync. update to v0.10.0.
This commit is contained in:
@@ -15,18 +15,23 @@ formatSource(
|
||||
|
||||
const content = formHash.elements["content"].value;
|
||||
const created = formHash.elements["created"].value;
|
||||
const version = parseInt(formHash.elements["version"].value, 10);
|
||||
const url = formHash.elements["url"].value;
|
||||
|
||||
const hash = hashTwt({
|
||||
content,
|
||||
created,
|
||||
url,
|
||||
});
|
||||
const hash = hashTwt(
|
||||
{
|
||||
content,
|
||||
created,
|
||||
url,
|
||||
},
|
||||
version,
|
||||
);
|
||||
|
||||
const result = [
|
||||
\`content: \${content}\`,
|
||||
\`created: \${created}\`,
|
||||
\`url: \${url}\`,
|
||||
\`version: \${version}\`,
|
||||
\`hash: \${hash}\`,
|
||||
].join("\\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user