# pyrophone.cabe

*module*

Byte-stream CABE transforms backed by the optional ``cabe`` extra.

Encryption nodes each own one PyCABE client and its lease cache. Service settings
are captured at startup; encapsulation attributes are read for each message.
Printer inspects envelope headers locally, without a client or decryption.
Importing this module or declaring graphs does not import PyCABE or perform I/O.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L1-L1)

## pyrophone.cabe.Decapsulator

*class*

```python
class Decapsulator(_CABETransform)
```

Bases: `pyrophone.cabe._CABETransform`

Authenticate and decrypt each CABE envelope, emitting only its payload.

Envelope attributes and content type are not forwarded on the bytes port.
Decode, authorization, and authentication errors fail the node; unauthenticated
plaintext is never emitted.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L159-L169)

### pyrophone.cabe.Decapsulator.service

*attribute* · *class attribute* · *instance attribute*

```python
service = Property[dict[str, object]](title='Key service', description='CABE service URL and optional PyCABE client settings. Missing TLS paths default from CABE_CERTIFICATE_FILE, CABE_KEY_FILE and CABE_CA_FILE when the node starts.')
```

Inherited from: `pyrophone.cabe._CABETransform`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L130-L137)

### pyrophone.cabe.Decapsulator.transform

*method* · *async*

```python
async def transform(value: bytes) -> bytes
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L168-L169)

### pyrophone.cabe.Decapsulator.run

*method* · *async*

```python
async def run() -> None
```

Inherited from: `pyrophone.cabe._CABETransform`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L140-L142)

## pyrophone.cabe.Encapsulator

*class*

```python
class Encapsulator(_CABETransform)
```

Bases: `pyrophone.cabe._CABETransform`

Encrypt each plaintext byte payload into one encoded CABE envelope.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L145-L156)

### pyrophone.cabe.Encapsulator.attrs

*attribute* · *class attribute* · *instance attribute*

```python
attrs = Property[dict[str, object]](default={}, title='Attributes', description='CABE attributes for each outgoing message, such as sensitivity.')
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L149-L153)

### pyrophone.cabe.Encapsulator.service

*attribute* · *class attribute* · *instance attribute*

```python
service = Property[dict[str, object]](title='Key service', description='CABE service URL and optional PyCABE client settings. Missing TLS paths default from CABE_CERTIFICATE_FILE, CABE_KEY_FILE and CABE_CA_FILE when the node starts.')
```

Inherited from: `pyrophone.cabe._CABETransform`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L130-L137)

### pyrophone.cabe.Encapsulator.transform

*method* · *async*

```python
async def transform(value: bytes) -> bytes
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L155-L156)

### pyrophone.cabe.Encapsulator.run

*method* · *async*

```python
async def run() -> None
```

Inherited from: `pyrophone.cabe._CABETransform`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L140-L142)

## pyrophone.cabe.Printer

*class*

```python
class Printer(Transform[bytes, bytes])
```

Bases: ``

Print CABE headers on one stdout line and forward the original bytes.

Inspection decodes and validates the envelope format without contacting a
key service. Headers remain unverified; this node does not authenticate or
decrypt messages. Attributes appear first; lease references use full hex.
Algorithm and partial IV are omitted; other headers follow.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L209-L222)

### pyrophone.cabe.Printer.transform

*method* · *async*

```python
async def transform(value: bytes) -> bytes
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/cabe.py#L219-L222)
