Buckets:
silverwolf-x/project / test /e2e /app-dir /cache-components /app /node-crypto /random-bytes /cached /page.tsx
| import crypto from 'node:crypto' | |
| import { SentinelValue } from '../../../getSentinelValue' | |
| export default async function Page() { | |
| const first = await getRandomBytes(1) | |
| const second = await getRandomBytes(2) | |
| return ( | |
| <div> | |
| <dl> | |
| <dt>[first] require('node:crypto').randomBytes(size)</dt> | |
| <dd id="first">{first.toString()}</dd> | |
| <dt>[second] require('node:crypto').randomBytes(size)</dt> | |
| <dd id="second">{second.toString()}</dd> | |
| </dl> | |
| <span id="page"> | |
| <SentinelValue /> | |
| </span> | |
| </div> | |
| ) | |
| } | |
| async function getRandomBytes(nonce: number) { | |
| 'use cache' | |
| if (nonce === 2) { | |
| return crypto.randomBytes(8, undefined) as unknown as Buffer | |
| } else { | |
| return crypto.randomBytes(8) | |
| } | |
| } | |
Xet Storage Details
- Size:
- 764 Bytes
- Xet hash:
- 63c94b6adcc7f2b015ddff02d99149e2e0b4e41fe562e29ddc218d7561d964de
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.