<?php

declare(strict_types=1);

namespace PhpWA\Crypto\Signal;

use InvalidArgumentException;

final class SignalCiphertext
{
    public const WHISPER = 1;
    public const PREKEY = 3;
      private $type;
      private $body;
    public function __construct(int $type, string $body) { if (($type !== self::WHISPER && $type !== self::PREKEY) || $body === '') { throw new InvalidArgumentException('Signal ciphertext is invalid.'); } $this->type = $type; $this->body = $body; }
    public function type(): int { return $this->type; }
    public function body(): string { return $this->body; }
}
