README.md 1.02 KB
Newer Older
1
# redox_users
Jose Narvaez's avatar
Jose Narvaez committed
2

Jose Narvaez's avatar
Jose Narvaez committed
3
Redox OS APIs for accessing users and groups information.
Jose Narvaez's avatar
Jose Narvaez committed
4

5
High level APIs for:
Jose Narvaez's avatar
Jose Narvaez committed
6
7
8
9
10

- Getting the current process effective user ID.
- Getting the current process user ID.
- Getting the current process effective group ID.
- Getting the current process group ID.
11
- Manipulating User and Group information (including adding, removing, and modifying groups and users, in addition to other functionality, see docs)
Jose Narvaez's avatar
Jose Narvaez committed
12

13
We recommend to use these APIs instead of directly manipulating the
14
`/etc/group` and `/etc/passwd` as this is an implementation detail and
Jose Narvaez's avatar
Jose Narvaez committed
15
16
might change in the future.

17
## Using redox_users
Jose Narvaez's avatar
Jose Narvaez committed
18
19
20

Make sure you have Rust nightly.

21
Add `redox_users` to `Cargo.toml`:
Jose Narvaez's avatar
Jose Narvaez committed
22
23

```toml
24
[dependencies.redox_users]
Jose Narvaez's avatar
Jose Narvaez committed
25
26
27
28
29
30
git = "https://github.com/redox-os/users.git"
```

then import it in your main file:

```rust
31
extern crate redox_users;
Jose Narvaez's avatar
Jose Narvaez committed
32
33
```

34
And `redox_users` is now ready to roll!
35
36
37
38
39
40

## Hashing
redox_users uses the Argon2 hashing algorithm. The default hashing parameters are as follows:
```Rust
Argon2::new(10, 1, 4096, Variant::Argon2i)
```