# `Ollixir.Blob`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/blob.ex#L1)

Module for working for blobs in Ollama.

Currently this module only provides a function for generating a SHA256 digest
of a binary blob.

# `digest`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/blob.ex#L19)

```elixir
@type digest() :: String.t()
```

Blob digest

The digest is a hex-encoded SHA256 hash of the binary blob, prefixed with the
algorithm.

## Example

    "sha256:054edec1d0211f624fed0cbca9d4f9400b0e491c43742af2c5b0abebf0c990d8"

# `digest`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/blob.ex#L42)

```elixir
@spec digest(binary()) :: digest()
```

Generates a SHA256 digest of a binary blob.

## Parameters

- `blob` - Raw binary data

## Examples

    iex> Ollixir.Blob.digest("hello")
    "sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"

## Returns

- `t:digest/0` - SHA256 digest string

## See Also

- `Ollixir.check_blob/2` - Check blob existence

---

*Consult [api-reference.md](api-reference.md) for complete listing*
