private function encode($seed, $format = null)
    {
        $encoder = $this->encoder;

        if ($format == self::FORMAT_HEX) {
            $encoder = new HexEncoder();
        } elseif ($format == self::FORMAT_BASE32) {
            $encoder = new Base32Encoder();
        } elseif ($format == self::FORMAT_RAW) {
            $encoder = new RawEncoder();
        }

        $output = $encoder->encode($seed);

        return $output;
    }