public function encrypt($plaintext, $password, $version = Cryptor::DEFAULT_SCHEMA_VERSION, $base64Encode = true)
    {
        $this->configure($version);

        $components = $this->makeComponents($version);
        $components->headers->encSalt = $this->makeSalt();
        $components->headers->hmacSalt = $this->makeSalt();
        $components->headers->iv = $this->makeIv($this->config->ivLength);

        $encKey = $this->makeKey($components->headers->encSalt, $password);
        $hmacKey = $this->makeKey($components->headers->hmacSalt, $password);

        return $this->encryptFromComponents($plaintext, $components, $encKey, $hmacKey, $base64Encode);
    }