Java Code Examples for org.telegram.tgnet.TLRPC#TL_passwordKdfAlgoUnknown

The following examples show how to use org.telegram.tgnet.TLRPC#TL_passwordKdfAlgoUnknown . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TwoStepVerificationActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}
 
Example 2
Source File: TwoStepVerificationActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}
 
Example 3
Source File: TwoStepVerificationActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}
 
Example 4
Source File: TwoStepVerificationActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}