# Struct keys::Signature

> A composite signature, 3 374 bytes.

`zaun_community_protocol::keys::Signature` · Struct

```rust
pub struct Signature(…)
```

A composite signature, 3 374 bytes.

## Methods

### `from_bytes`

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

Parses the encoding, checking the suite byte and length.

# Errors
`KeyEncodingError` for an unknown suite or a wrong length.

### `as_bytes`

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

The full encoding, suite byte first.

### `suite`

```rust
pub fn suite(&self) -> Suite
```

The suite.

### `mldsa`

```rust
pub fn mldsa(&self) -> &[u8]
```

The ML-DSA-65 component (RFC 10073 serialisation, first part).

### `ed25519`

```rust
pub fn ed25519(&self) -> &[u8]
```

The Ed25519 component (RFC 10073 serialisation, second part).

## Trait implementations

`Clone`, `Debug`, `Deserialize<'de>`, `Eq`, `Hash`, `PartialEq`, `Serialize`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/keys/struct.Signature.html)
