tpm_get_random(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tpm_get_random(9) β€” the kernel API manual, but make it cute πŸ’–

okay so bestie, welcome to the tpm_get_random page from the Kernel API Manual ✨ this one is short and sweet: it's literally the function that asks your TPM for random bytes. no cap, that's the whole vibe. πŸŽ€


🌸 NAME 🌸

tpm_get_random β€” get random bytes from the TPM's RNG πŸŽ²πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int tpm_get_random (struct tpm_chip *chip , u8 *out , size_t max );

✨ ARGUMENTS ✨

  • chip β€” a struct tpm_chip instance, or NULL for the default chip 🫢 (yes, NULL is totally valid here, it just means "bestie, use the default one")
  • out β€” the destination buffer where the random bytes go πŸ“
  • max β€” the max number of bytes to write to out πŸ“

πŸ’… RETURN πŸ’…

the number of random bytes read, or a negative error value 😭 (so like, check it, fr fr)


πŸ‘‘ SEE ALSO πŸ‘‘


lowkey a whole friend group of TPM functions right there β€” go say hi to them too πŸ’œ

and that's the page!! 🌈 this one came from the source/version line ./drivers/char/tpm and it's dated October 2026 ⭐ β€” so yeah, future vibes only, periodt πŸ’€βœ¨ hope that helped bestie, iykyk πŸ§šπŸ’–

πŸ“¦ where this page comes from