Function CryptoGetTextPassword

Synopsis

#include <include/opencallback.hpp>

STDMETHOD() CryptoGetTextPassword(BSTR *password)

Description

No description yet.

Source

Lines 123-142 in src/opencallback.cpp. Line 59 in include/opencallback.hpp.

STDMETHODIMP OpenCallback::CryptoGetTextPassword( BSTR* password ) {
    wstring pass;
    if ( !mHandler.isPasswordDefined() ) {
        // You can ask real password here from user
        // Password = GetPassword(OutStream);
        // PasswordIsDefined = true;
        if ( mHandler.passwordCallback() ) {
            pass = mHandler.passwordCallback()();
        }

        if ( pass.empty() ) {
            mErrorMessage = L"Password is not defined";
            return E_ABORT;
        }
    } else {
        pass = mHandler.password();
    }

    return StringToBstr( pass.c_str(), password );
}





Add Discussion as Guest

Log in