/Knowledge/sources/honojs__hono/llms-full/cookie-helper-usage-signed-cookies--3a097e0df02d.md

Cookie Helper: Usage > Signed cookies - hono-docs

Cookie Helper: Usage Signed cookies Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt signed cookies Sum...

Cookie Helper: Usage > Signed cookies

Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#signed-cookies

Summary

NOTE: Setting and retrieving signed cookies returns a Promise due to the async nature of the WebCrypto API, which is used to create HMAC SHA-256 signatures. ```ts app.get('/signed-cookie', (c) => { const secret = 'secret' // make sur...

Content

NOTE: Setting and retrieving signed cookies returns a Promise due to the async nature of the WebCrypto API, which is used to create HMAC SHA-256 signatures.

app.get('/signed-cookie', (c) => {
  const secret = 'secret' // make sure it's a large enough string to be secure

  await setSignedCookie(c, 'cookie_name0', 'cookie_value', secret)
  const fortuneCookie = await getSignedCookie(
    c,
    secret,
    'cookie_name0'
  )
  deleteCookie(c, 'cookie_name0')
  // `getSignedCookie` will return `false` for a specified cookie if the signature was tampered with or is invalid
  const allSignedCookies = await getSignedCookie(c, secret)
  // ...
})

Metadata

{
  "chunk_index": 0,
  "citation": "https://hono.dev/llms-full.txt#signed-cookies",
  "coverage_role": "overview",
  "qualified_title": "Hono / llms-full / Cookie Helper > Usage > Signed cookies",
  "retrieved_at": "2026-07-02T05:51:01Z",
  "section_index": 718,
  "source_id": "/honojs/hono",
  "source_type": "llms_full",
  "target_label": "llms-full",
  "title": "Cookie Helper: Usage > Signed cookies",
  "upstream_url": "https://hono.dev/llms-full.txt",
  "version": "2026"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/cookie-helper-usage-signed-cookies--3a097e0df02d.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.