CheckPassword()

PresentationInfo::CheckPassword(System::String) method

Checks whether a password is correct for a presentation protected with open password.

bool Aspose::Slides::PresentationInfo::CheckPassword(System::String password) override

Arguments

ParameterTypeDescription
passwordSystem::StringThe password to check.

Return Value

True if the presentation is protected with open password and the password is correct and false otherwise.

Remarks

auto info = PresentationFactory::get_Instance()->GetPresentationInfo(u"pres.pptx");
bool isPasswordCorrect = info->CheckPassword(u"my_password");

When the password is null or empty, this method returns false.

See Also