---
title: "Argon2i"
description: "Argon2 with memory reads that never depend on the password. Side channels get nothing and it needs more passes for it"
canonical_url: "https://hashes.agntn.dev/algorithms/argon2i"
---
# Argon2i

> Argon2 with memory reads that never depend on the password. Side channels get nothing and it needs more passes for it

<algorithm-facts name="argon2i">



</algorithm-facts>

argon2i picks every block it reads from a counter, never from the password. Somebody timing your cache learns nothing. The price? It trades memory for time more willingly, so RFC 9106 says it makes more passes to make up for it. Three passes is about right for most memory sizes, by the RFC's own math.

```ts
create("argon2i").hash("password", {
  salt: "73616c7473616c74",
  memory: 1024,
  iterations: 2,
  parallelism: 1,
}).digest;
// "51d1ed13365c7dd42d6cfaefa4c1efe10eb7196a44ed4069a0486d308a93610d"
```

Same password, same salt, same cost as the [argon2id](https://hashes.agntn.dev/algorithms/argon2id) example. A different digest anyway, because the variant goes into the very first hash. Mix them up and nothing will ever match.

Options, defaults and the byte function `argon2i` from `@agntn/hashes/argon2` work exactly like on the [argon2id](https://hashes.agntn.dev/algorithms/argon2id) page. Starting something new? Take argon2id. The RFC does too.


## Sitemap

See the full [sitemap](https://hashes.agntn.dev/sitemap.md) for all pages.
