# Struct crypto::voice::WrappedKey

> A base key wrapped to one recipient: X-Wing `enc` ‖ AES-256-GCM ciphertext ‖ tag.

`zaun_community_protocol::crypto::voice::WrappedKey` · Struct

```rust
pub struct WrappedKey(…)
```

A base key wrapped to one recipient: X-Wing `enc` ‖ AES-256-GCM ciphertext ‖ tag.

## Methods

### `from_bytes`

```rust
pub fn from_bytes(bytes: &[u8]) -> Result<Self, VoiceError>
```

Parses the wire form.

# Errors
`VoiceError::Length` unless exactly `WRAPPED_KEY_LEN` bytes.

### `as_bytes`

```rust
pub const fn as_bytes(&self) -> &[u8; 1168]
```

The wire form.

### `hash`

```rust
pub fn hash(&self) -> [u8; 32]
```

`SHA3-256` of the wire form, as signed in `SenderKeys`.

## Trait implementations

`Clone`, `Debug`, `Eq`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/crypto/voice/sender/struct.WrappedKey.html)
