marqdo

Mid stdlib — hash and secretsok

features/10-hash-secrets.mq.md

文档

hash:lib/hash.mq.mdsec:lib/secrets.mq.md

Digests and secure tokens

说明

Integrity digests and cryptographic tokens stay in lib/ — do not use math.random for secrets.

main

说明
`d` = > hash.sha256 text="marqdo"
`t` = > sec.token_hex n=8
`L` = > len `t`
> print text=d
> print text=L
  1. L == 16
    > print text=mid-m3-ok
  2. else
    > print text=mid-m3-fail
Functions
Variables
  • L int
    16
  • d text
    f2f787a9d343fec86007178a1735620f2e8f2c9bb472411a934378791e537143
  • description text
    lib/hash + lib/secrets without plugins (Mid M3)
  • markup text
    occlusion
  • t text
    c5478e389927594e
  • title text
    Mid stdlib — hash and secrets
可执行知识(辅助)

运行与结果

f2f787a9d343fec86007178a1735620f2e8f2c9bb472411a934378791e537143 16 mid-m3-ok
完整源码
---
markup: occlusion
title: Mid stdlib — hash and secrets
description: lib/hash + lib/secrets without plugins (Mid M3)
import:
  hash: lib/hash.mq.md
  sec: lib/secrets.mq.md
---

# Digests and secure tokens

Integrity digests and cryptographic tokens stay in `lib/` — do not use `math.random` for secrets.

# main

**`d` = > hash.sha256 text="marqdo"**
**`t` = > sec.token_hex n=8**
**`L` = > len `t`**
> print text=`d`
> print text=`L`
1. `L` == 16
  > print text=mid-m3-ok
2. *
  > print text=mid-m3-fail

Variable