---
name: "bson_oid_init_from_data"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_oid_init_from_data"
---

# bson\_oid\_init\_from\_data(3)

## SYNOPSIS

```
void
bson_oid_init_from_data (bson_oid_t *oid, const uint8_t *data);
```

## PARAMETERS

- •

  **oid**: A *bson\_oid\_t*.

- •

  **data**: A buffer containing 12 bytes for the oid.

## DESCRIPTION

Initializes a *bson\_oid\_t* using the raw buffer provided.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
