FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

update tag hash instructions · devhttps/frontend@17c7ff0 · GitHub

Commit 17c7ff0

Browse files
committed
update tag hash instructions
1 parent 336428a commit 17c7ff0

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

‎docs/01-start-here/07-faqs.md‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,11 @@ Sometimes we want to create a badge for a story, but don't want the world to kno
2828

2929
To link a badge to a secret tag:
3030

31-
1. Install `pwgen`, a random string generator. Mac users can install this using Homebrew: `brew install pwgen`
32-
2. Generate a bunch of random strings: `pwgen -n -y 20`. Copy one of them to the clipboard. This will be the salt.
33-
3. From the command line, run `sbt`. Inside `sbt` run `console`
34-
4. From the console run: `import java.security.MessageDigest`
35-
5. From the console run: `import java.math.BigInteger`
36-
6. From the console run: `val input = "[salt from the clipboard]" + "your/secret/tag"`
37-
7. From the console run: `val digest = MessageDigest.getInstance("MD5")`
38-
8. From the console run: `digest.update(input.getBytes(), 0, input.length)`
39-
9. From the console run: `new BigInteger(1, digest.digest()).toString(16)`
40-
10. The result of the last step is your encrypted tag
41-
11. In the `Badges` object, add a new val: `val specialReport = SpecialBadge("[salt]", "[encrypted tag]", Static("path/to/Badge.svg"))`
42-
12. In CODE create an article with your new tag and ensure the badge is applied correctly
31+
1. Run `sbt "badgeHash [your tag]`"
32+
2. The output looks like
33+
```
34+
salt=XXXXXXXXX
35+
hash=XXXXXXXXX
36+
```
37+
3. In the `Badges` object, add a new val: `val specialReport = SpecialBadge("[salt]", "[hashed tag]", Static("path/to/Badge.svg"))`
38+
4. In CODE create an article with your new tag and ensure the badge is applied correctly

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL