public function fromEncrypted($encrypted, $key)
    {
        $encrypted = $this->getStringable($encrypted);

        $key = $this->getStringable($key);

        if ($this->isEncryptedContainer($encrypted, $key))
        {
            $data = JWT::decode($encrypted, $key);

            return $this->fromJson($data->container);
        }

        throw new BadMethodCallException('Expected encrypted Container, got: ' . $encrypted);
    }
public function fromEncrypted($encrypted, $key)
    {
        $encrypted = $this->getStringable($encrypted);

        $key = $this->getStringable($key);

        if ($this->isEncryptedContainer($encrypted, $key))
        {
            $data = JWT::decode($encrypted, $key);

            return $this->fromJson($data->container);
        }

        throw new BadMethodCallException('Expected encrypted Container, got: ' . $encrypted);
    }
public function fromEncrypted ( $ encrypted , $ key ) { $ encrypted = $ this -> getStringable ( $ encrypted ) ; $ key = $ this -> getStringable ( $ key ) ; if ( $ this -> isEncryptedContainer ( $ encrypted , $ key ) ) { $ data = JWT :: decode ( $ encrypted , $ key ) ; return $ this -> fromJson ( $ data -> container ) ; } throw new BadMethodCallException ( 'Expected encrypted Container, got: ' . $ encrypted ) ; }
Construct from Encrypted Container.

@param string|StringContract $encrypted
@param string|StringContract $key
@return \im\Primitive\Container\Container
Construct from Encrypted Container .