本文整理汇总了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);
}
示例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;
}
示例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));
}
}
示例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));
}
}
示例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 "";
}
示例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));
}
}
示例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);
}
示例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;
}
示例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);
}
示例10: getHexEncodedPublicKey
import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getHexEncodedPublicKey() {
return RSACipher.getHexEncodedPublicKey();
}
示例11: getHexEncodedPublicKey
import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getHexEncodedPublicKey() {
return RSACipher.getHexEncodedPublicKey();
}
示例12: getEncryptedBotToken
import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getEncryptedBotToken() {
return StringUtil.isEmpty(botToken) ? "" : RSACipher.encryptDataForWeb(botToken);
}
示例13: setEncryptedBotToken
import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public void setEncryptedBotToken(String encrypted) {
this.botToken = RSACipher.decryptWebRequestData(encrypted);
}
示例14: getEncryptedProxyPassword
import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public String getEncryptedProxyPassword() {
return StringUtil.isEmpty(proxyPassword) ? "" : RSACipher.encryptDataForWeb(proxyPassword);
}
示例15: setEncryptedProxyPassword
import jetbrains.buildServer.serverSide.crypt.RSACipher; //导入依赖的package包/类
public void setEncryptedProxyPassword(String encrypted) {
this.proxyPassword = RSACipher.decryptWebRequestData(encrypted);
}