public function decrypt($encryptedBase64Data, $password)
    {
        $components = $this->unpackEncryptedBase64Data($encryptedBase64Data);

        if (!$this->hmacIsValid($components, $password)) {
            return false;
        }

        $key = $this->makeKey($components->headers->encSalt, $password);
        if ($this->config->mode == 'ctr') {
            return $this->aesCtrLittleEndianCrypt($components->ciphertext, $key, $components->headers->iv);
        }

        $iv = (string)$components->headers->iv;
        $method = $this->config->algorithm . 'cbc';

        return openssl_decrypt($components->ciphertext, $method, $key, OPENSSL_RAW_DATA, (string)$iv);
    }