案例
Example keys and passwords are public test material.
The timestamp changes on each run. Recover the payload shown here; use this public key only for experiments.
Keep a dark theme and French locale
输入
{"theme":"dark","locale":"fr-FR"}Expected checks
Flask Session Decode recovers:
{"theme":"dark","locale":"fr-FR"}- 密钥
{"option":"UTF8","string":"public-demo-secret"}- 盐值
{"option":"UTF8","string":"cookie-session"}- 算法
sha1
Preserve a shopping cart with two quantities
输入
{"cart":[{"sku":"BOOK-01","qty":2},{"sku":"MAP-02","qty":1}]}Expected checks
Flask Session Decode recovers:
{"cart":[{"sku":"BOOK-01","qty":2},{"sku":"MAP-02","qty":1}]}- 密钥
{"option":"UTF8","string":"public-demo-secret"}- 盐值
{"option":"UTF8","string":"cookie-session"}- 算法
sha256
Keep false distinct from a missing permission
输入
{"roles":["reader"],"can_publish":false}Expected checks
Flask Session Decode recovers:
{"roles":["reader"],"can_publish":false}- 密钥
{"option":"UTF8","string":"public-demo-secret"}- 盐值
{"option":"UTF8","string":"cookie-session"}- 算法
sha256
Retain a zero-prefixed customer identifier
输入
{"customer_id":"000042","return_to":"/orders?state=open"}Expected checks
Flask Session Decode recovers:
{"customer_id":"000042","return_to":"/orders?state=open"}- 密钥
{"option":"UTF8","string":"public-demo-secret"}- 盐值
{"option":"UTF8","string":"cookie-session"}- 算法
sha1
Sign a nested feature setting with a custom salt
输入
{"features":{"compact":true,"preview":null}}Expected checks
Flask Session Decode recovers:
{"features":{"compact":true,"preview":null}}- 密钥
{"option":"UTF8","string":"public-demo-secret"}- 盐值
{"option":"UTF8","string":"demo-preferences"}- 算法
sha256