Example usage for com.intellij.openapi.util PasswordUtil encodePassword

List of usage examples for com.intellij.openapi.util PasswordUtil encodePassword

Introduction

In this page you can find the example usage for com.intellij.openapi.util PasswordUtil encodePassword.

Prototype

@NotNull
    public static String encodePassword(char @Nullable [] password) 

Source Link

Usage

From source file:com.intellij.remotesdk.RemoteCredentialsHolder.java

License:Apache License

public String getSerializedPassword() {
    if (myAnonymous)
        return "";

    if (myStorePassword) {
        return PasswordUtil.encodePassword(myPassword);
    } else {/*w  w w  . j  a v a2  s  .c  o m*/
        return "";
    }
}

From source file:com.intellij.remotesdk.RemoteCredentialsHolder.java

License:Apache License

@Nullable
public String getSerializedPassphrase() {
    if (myStorePassphrase) {
        return PasswordUtil.encodePassword(myPassphrase);
    } else {/*from   w w w  .j a v  a 2  s . com*/
        return "";
    }
}

From source file:com.intellij.tasks.impl.BaseRepository.java

License:Apache License

@Tag("password")
public String getEncodedPassword() {
    return PasswordUtil.encodePassword(getPassword());
}

From source file:com.targetprocess.intellij.TargetProcessSettings.java

License:Open Source License

public String getEncodedPassword() {
    return PasswordUtil.encodePassword(getPassword());
}

From source file:org.coding.git.tasks.CodingNetRepository.java

License:Apache License

@Tag("token")
public String getEncodedToken() {
    return PasswordUtil.encodePassword(getToken());
}

From source file:org.jetbrains.tfsIntegration.core.configuration.Credentials.java

License:Apache License

@Nullable
@Tag(value = "password")
public String getEncodedPassword() {
    return myStorePassword && myPassword != null ? PasswordUtil.encodePassword(myPassword) : null;
}

From source file:org.qi4j.chronos.UserConfig.java

License:Open Source License

public void writeUserConfig() {
    FileOutputStream fileOutputStream = null;

    try {// w ww.ja  v a2 s  . com
        Properties properties = new Properties();

        properties.setProperty(LOGINID, loginId);
        properties.setProperty(PASSWORD, PasswordUtil.encodePassword(password));

        File chronosDir = ChronosUtil.getChronosDir();

        fileOutputStream = new FileOutputStream(new File(chronosDir, USER_CONFIG_FILE));

        properties.store(fileOutputStream, null);
    } catch (Exception err) {
        //TODO bp. handle exception
        err.printStackTrace();
    } finally {
        if (fileOutputStream != null) {
            try {
                fileOutputStream.close();
            } catch (IOException ioErr) {
                //ignore it
            }
        }
    }
}