当前位置: 首页>>代码示例>>Java>>正文


Java RSACipher类代码示例

本文整理汇总了Java中jetbrains.buildServer.serverSide.crypt.RSACipher的典型用法代码示例。如果您正苦于以下问题:Java RSACipher类的具体用法?Java RSACipher怎么用?Java RSACipher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RSACipher类属于jetbrains.buildServer.serverSide.crypt包,在下文中一共展示了RSACipher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fillModel

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
@Override
public void fillModel(@NotNull Map<String, Object> model, @NotNull HttpServletRequest request){
    super.fillModel(model, request);
    msteamsMainSettings.refresh();
    model.put("token", this.msteamsMainSettings.getToken());
    model.put("botName", this.msteamsMainSettings.getBotName());
    model.put("iconUrl", this.msteamsMainSettings.getIconUrl());
    model.put("maxCommitsToDisplay", this.msteamsMainSettings.getMaxCommitsToDisplay());
    model.put("showBuildAgent", this.msteamsMainSettings.getShowBuildAgent());
    model.put("showCommits", this.msteamsMainSettings.getShowCommits());
    model.put("showCommitters", this.msteamsMainSettings.getShowCommitters());
    model.put("showElapsedBuildTime", this.msteamsMainSettings.getShowElapsedBuildTime());
    model.put("showFailureReason", this.msteamsMainSettings.getShowFailureReason());

    MsTeamsNotificationProxyConfig proxyConfig = this.msteamsMainSettings.getProxyConfig();
    model.put("proxyHost", proxyConfig.getProxyHost());
    model.put("proxyPort", proxyConfig.getProxyPort());
    model.put("proxyUser", proxyConfig.getCreds() == null ? null : proxyConfig.getCreds().getUserPrincipal().getName());
    model.put("proxyPassword", proxyConfig.getCreds() == null ? null : proxyConfig.getCreds().getPassword());
    model.put("encryptedProxyPassword", proxyConfig.getCreds() == null || proxyConfig.getCreds().getPassword() == null ? null : RSACipher.encryptDataForWeb(proxyConfig.getCreds().getPassword()));
    model.put("hexEncodedPublicKey", RSACipher.getHexEncodedPublicKey());

    try {
        model.put("pluginVersion", this.msteamsMainSettings.getPluginVersion());
    } catch (IOException e) {
        Loggers.ACTIVITIES.error("Could not retrieve msteams plugin version", e);
    }

    model.put("disabled", !this.msteamsMainSettings.getEnabled());
    model.put("jspHome", this.jspHome);
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:32,代码来源:MsTeamsNotifierAdminPage.java

示例2: handleConfigurationChange

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private HashMap<String, Object> handleConfigurationChange(HttpServletRequest request) throws IOException, MsTeamsConfigValidationException {
    setRequestParams(request);
    if(!isNullOrEmpty(proxyPassword)){
        proxyPassword = RSACipher.decryptWebRequestData(proxyPassword);
    }

    Validate(token, botName, iconUrl, maxCommitsToDisplay, showBuildAgent, proxyHost, proxyPort, proxyUser, proxyPassword);

    this.config.setToken(token);
    this.config.getContent().setBotName(botName);
    this.config.getContent().setIconUrl(iconUrl);
    this.config.getContent().setMaxCommitsToDisplay(Integer.parseInt(maxCommitsToDisplay));
    this.config.getContent().setShowBuildAgent(Boolean.parseBoolean(showBuildAgent));
    this.config.getContent().setShowCommits(Boolean.parseBoolean(showCommits));
    this.config.getContent().setShowCommitters(Boolean.parseBoolean(showCommitters));
    this.config.getContent().setShowElapsedBuildTime((Boolean.parseBoolean(showElapsedBuildTime)));
    this.config.getContent().setShowFailureReason((Boolean.parseBoolean(showFailureReason)));


    this.config.setProxyHost(proxyHost);
    this.config.setProxyPort(isNullOrEmpty(proxyPort) ? null : Integer.parseInt(proxyPort));
    this.config.setProxyUsername(proxyUser);
    this.config.setProxyPassword(proxyPassword);


    this.config.save();

    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("message", "Saved");
    return params;
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:32,代码来源:MsTeamsNotifierSettingsController.java

示例3: setEncryptedProperty

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private static void setEncryptedProperty(final String paramName, final String value,
                                         final BasePropertiesBean bean, final boolean includeEmptyValues) {
    String propName = paramName.substring(ENCRYPTED_PROPERTY_PREFIX.length());
    String propertyValue = RSACipher.decryptWebRequestData(value);
    if (propertyValue != null && (includeEmptyValues || propertyValue.length() > 0)) {
        bean.setProperty(propName, toUnixLineFeeds(propertyValue));
    }
}
 
开发者ID:JetBrains,项目名称:teamcity-google-agent,代码行数:9,代码来源:PluginPropertiesUtil.java

示例4: setEncryptedProperty

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private static void setEncryptedProperty(final String paramName, final HttpServletRequest request,
                                         final BasePropertiesBean bean, final boolean includeEmptyValues) {
    String propName = paramName.substring(ENCRYPTED_PROPERTY_PREFIX.length());
    String propertyValue = RSACipher.decryptWebRequestData(request.getParameter(paramName));
    if (propertyValue != null && (includeEmptyValues || propertyValue.length() > 0)) {
        bean.setProperty(propName, toUnixLineFeeds(propertyValue));
    }
}
 
开发者ID:JetBrains,项目名称:teamcity-kubernetes-plugin,代码行数:9,代码来源:PluginPropertiesUtil.java

示例5: getDecryptedWebPassword

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private String getDecryptedWebPassword(final String webEncryptedPass) throws IllegalArgumentException, EncryptionException {
    if (StringUtils.isNotBlank(webEncryptedPass)) {
        final String webDecryptedPass = RSACipher.decryptWebRequestData(webEncryptedPass);

        if (StringUtils.isNotBlank(webDecryptedPass)) {
            return webDecryptedPass;
        }
    }
    return "";
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:11,代码来源:HubGlobalServerConfigController.java

示例6: setEncryptedProperty

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private static void setEncryptedProperty(final String paramName, final HttpServletRequest request,
                                         final BasePropertiesBean bean, final boolean includeEmptyValues) {
  String propName = paramName.substring(ENCRYPTED_PROPERTY_PREFIX.length());
  String propertyValue = RSACipher.decryptWebRequestData(request.getParameter(paramName));
  if (propertyValue != null && (includeEmptyValues || propertyValue.length() > 0)) {
    bean.setProperty(propName, toUnixLineFeeds(propertyValue));
  }
}
 
开发者ID:JetBrains,项目名称:teamcity-s3-artifact-storage-plugin,代码行数:9,代码来源:PluginPropertiesUtil.java

示例7: getPassword

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private String getPassword(final HttpServletRequest request){
    String encryptedPassword = request.getParameter(PARAM_ENCRYPTED_PASSWORD);
    if(encryptedPassword == null){
        return encryptedPassword;
    }
    return RSACipher.decryptWebRequestData(encryptedPassword);
}
 
开发者ID:automate-website,项目名称:teamcity-plugin,代码行数:8,代码来源:GlobalConfigRequest.java

示例8: handleConfigurationChange

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
private HashMap<String, Object> handleConfigurationChange(HttpServletRequest request) throws IOException, SlackConfigValidationException {
    setRequestParams(request);
    if(!isNullOrEmpty(proxyPassword)){
        proxyPassword = RSACipher.decryptWebRequestData(proxyPassword);
    }

    Validate(teamName, token, botName, iconUrl, defaultChannel, maxCommitsToDisplay, showBuildAgent, proxyHost, proxyPort, proxyUser, proxyPassword);

    this.config.setTeamName(teamName);
    this.config.setToken(token);
    this.config.getContent().setBotName(botName);
    this.config.getContent().setIconUrl(iconUrl);
    this.config.setDefaultChannel(defaultChannel);
    this.config.getContent().setMaxCommitsToDisplay(Integer.parseInt(maxCommitsToDisplay));
    this.config.getContent().setShowBuildAgent(Boolean.parseBoolean(showBuildAgent));
    this.config.getContent().setShowCommits(Boolean.parseBoolean(showCommits));
    this.config.getContent().setShowCommitters(Boolean.parseBoolean(showCommitters));
    this.config.getContent().setShowElapsedBuildTime((Boolean.parseBoolean(showElapsedBuildTime)));
    this.config.getContent().setShowFailureReason((Boolean.parseBoolean(showFailureReason)));


    this.config.setProxyHost(proxyHost);
    this.config.setProxyPort(isNullOrEmpty(proxyPort) ? null : Integer.parseInt(proxyPort));
    this.config.setProxyUsername(proxyUser);
    this.config.setProxyPassword(proxyPassword);


    this.config.save();

    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("message", "Saved");
    return params;
}
 
开发者ID:PeteGoo,项目名称:tcSlackBuildNotifier,代码行数:34,代码来源:SlackNotifierSettingsController.java

示例9: fillModel

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
@Override
public void fillModel(@NotNull Map<String, Object> model, @NotNull HttpServletRequest request){
    super.fillModel(model, request);
    slackMainSettings.refresh();
    model.put("teamName", this.slackMainSettings.getTeamName());
    model.put("token", this.slackMainSettings.getToken());
    model.put("botName", this.slackMainSettings.getBotName());
    model.put("iconUrl", this.slackMainSettings.getIconUrl());
    model.put("defaultChannel", this.slackMainSettings.getDefaultChannel());
    model.put("maxCommitsToDisplay", this.slackMainSettings.getMaxCommitsToDisplay());
    model.put("showBuildAgent", this.slackMainSettings.getShowBuildAgent());
    model.put("showCommits", this.slackMainSettings.getShowCommits());
    model.put("showCommitters", this.slackMainSettings.getShowCommitters());
    model.put("showElapsedBuildTime", this.slackMainSettings.getShowElapsedBuildTime());
    model.put("showFailureReason", this.slackMainSettings.getShowFailureReason());

    SlackNotificationProxyConfig proxyConfig = this.slackMainSettings.getProxyConfig();
    model.put("proxyHost", proxyConfig.getProxyHost());
    model.put("proxyPort", proxyConfig.getProxyPort());
    model.put("proxyUser", proxyConfig.getCreds() == null ? null : proxyConfig.getCreds().getUserPrincipal().getName());
    model.put("proxyPassword", proxyConfig.getCreds() == null ? null : proxyConfig.getCreds().getPassword());
    model.put("encryptedProxyPassword", proxyConfig.getCreds() == null || proxyConfig.getCreds().getPassword() == null ? null : RSACipher.encryptDataForWeb(proxyConfig.getCreds().getPassword()));
    model.put("hexEncodedPublicKey", RSACipher.getHexEncodedPublicKey());

    try {
        model.put("pluginVersion", this.slackMainSettings.getPluginVersion());
    } catch (IOException e) {
        Loggers.ACTIVITIES.error("Could not retrieve slack plugin version", e);
    }

    model.put("disabled", !this.slackMainSettings.getEnabled());
    model.put("jspHome", this.jspHome);
}
 
开发者ID:PeteGoo,项目名称:tcSlackBuildNotifier,代码行数:34,代码来源:SlackNotifierAdminPage.java

示例10: getHexEncodedPublicKey

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getHexEncodedPublicKey() {
    return RSACipher.getHexEncodedPublicKey();
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:4,代码来源:ServerHubConfigPersistenceManager.java

示例11: getHexEncodedPublicKey

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getHexEncodedPublicKey() {
  return RSACipher.getHexEncodedPublicKey();
}
 
开发者ID:dancing-elf,项目名称:teamcity-telegram-plugin,代码行数:4,代码来源:TelegramSettingsBean.java

示例12: getEncryptedBotToken

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getEncryptedBotToken() {
  return StringUtil.isEmpty(botToken) ? "" : RSACipher.encryptDataForWeb(botToken);
}
 
开发者ID:dancing-elf,项目名称:teamcity-telegram-plugin,代码行数:4,代码来源:TelegramSettingsBean.java

示例13: setEncryptedBotToken

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public void setEncryptedBotToken(String encrypted) {
  this.botToken = RSACipher.decryptWebRequestData(encrypted);
}
 
开发者ID:dancing-elf,项目名称:teamcity-telegram-plugin,代码行数:4,代码来源:TelegramSettingsBean.java

示例14: getEncryptedProxyPassword

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getEncryptedProxyPassword() {
  return StringUtil.isEmpty(proxyPassword) ? "" : RSACipher.encryptDataForWeb(proxyPassword);
}
 
开发者ID:dancing-elf,项目名称:teamcity-telegram-plugin,代码行数:4,代码来源:TelegramSettingsBean.java

示例15: setEncryptedProxyPassword

import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public void setEncryptedProxyPassword(String encrypted) {
  this.proxyPassword = RSACipher.decryptWebRequestData(encrypted);
}
 
开发者ID:dancing-elf,项目名称:teamcity-telegram-plugin,代码行数:4,代码来源:TelegramSettingsBean.java


注:本文中的jetbrains.buildServer.serverSide.crypt.RSACipher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。