doc: fix and modernize code examples in crypto.md
Checklist
-
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
doc, crypto
-
var
->const
/let
. - Fix error in code example (basing on the previous example).
-
equal
->strictEqual
,==
->===
. - Update estimated outputs in code example comments.
- snake_case -> camelCase (unlike method signatures, examples mostly use camelCase).
- Concatenation -> multiline template.
- Add missing line break in code example (the code throws currently; fixed basing on the history).
- Add missing link reference.