# `./fio-stl/152 sha1.h`

4 public symbols.

### Types

#### `fio_sha1_s`

```c
typedef union {
#ifdef __SIZEOF_INT128__
__uint128_t align__;
#else
uint64_t align__;
#endif
uint32_t v[5];
uint8_t digest[20];
} fio_sha1_s
```

The data type containing the SHA1 digest (result).

_Symbol type:_ `type`

### Functions

#### `fio_sha1`

```c
fio_sha1_s fio_sha1(const void *data, uint64_t len)
```

A simple, non streaming, implementation of the SHA1 hashing algorithm.

Do NOT use - SHA1 is broken... but for some reason some protocols still
require it's use (i.e., WebSockets), so it's here for your convenience.

_Symbol type:_ `function`

#### `fio_sha1_len`

```c
inline size_t fio_sha1_len(void)
```

Returns the digest length of SHA1 in bytes (20 bytes)

_Symbol type:_ `function`

#### `fio_sha1_digest`

```c
inline uint8_t *fio_sha1_digest(fio_sha1_s *s)
```

Returns the 20 Byte long digest of a SHA1 object.

_Symbol type:_ `function`

-----------------------------------------------------
