本文整理了Java中jcifs.util.Base64.decode()
方法的一些代码示例,展示了Base64.decode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.decode()
方法的具体详情如下:
包路径:jcifs.util.Base64
类名称:Base64
方法名:decode
[英]Decodes the supplied Base-64 encoded string.
[中]解码提供的Base-64编码字符串。
代码示例来源:origin: org.mule.transports/mule-transport-http
/**
* Creates a {@link Type2Message} for NTLM authentication from a challenge
* received from the NTLM server.
*
* @param challenge the challenge received from the server in response to a
* {@link Type1Message} message previously sent.
* @return a {@link Type2Message} to continue the authentication process.
*/
public Type2Message createType2Message(String challenge)
{
try
{
return new Type2Message(Base64.decode(challenge));
}
catch (IOException e)
{
throw new RuntimeException("Invalid Type2 message", e);
}
}
代码示例来源:origin: kohsuke/jcifs
if (ntlm == null) return;
} else {
String auth = new String(Base64.decode(msg.substring(6)),
"US-ASCII");
int index = auth.indexOf(':');
代码示例来源:origin: jcifs/jcifs
if (ntlm == null) return;
} else {
String auth = new String(Base64.decode(msg.substring(6)),
"US-ASCII");
int index = auth.indexOf(':');
代码示例来源:origin: com.jaeksoft/jcifs-krb5-jdk7
if (ntlm == null) return;
} else {
String auth = new String(Base64.decode(msg.substring(6)),
"US-ASCII");
int index = auth.indexOf(':');
代码示例来源:origin: jcifs/jcifs
String auth = new String( Base64.decode( msg.substring(6) ), "US-ASCII" );
int index = auth.indexOf( ':' );
String user = (index != -1) ? auth.substring(0, index) : auth;
代码示例来源:origin: org.samba.jcifs/jcifs
if (ntlm == null) return;
} else {
String auth = new String(Base64.decode(msg.substring(6)),
"US-ASCII");
int index = auth.indexOf(':');
代码示例来源:origin: jcifs/jcifs
new Type2Message(Base64.decode(authorization)) : null;
reconnect();
if (message == null) {
代码示例来源:origin: kohsuke/jcifs
new Type2Message(Base64.decode(authorization)) : null;
reconnect();
if (message == null) {
代码示例来源:origin: jcifs/jcifs
String msg = req.getHeader("Authorization");
if (msg != null && msg.startsWith("NTLM ")) {
byte[] src = Base64.decode(msg.substring(5));
if (src[8] == 1) {
Type1Message type1 = new Type1Message(src);
代码示例来源:origin: com.jaeksoft/jcifs-krb5-jdk7
String msg = req.getHeader("Authorization");
if (msg != null && msg.startsWith("NTLM ")) {
byte[] src = Base64.decode(msg.substring(5));
if (src[8] == 1) {
Type1Message type1 = new Type1Message(src);
代码示例来源:origin: kohsuke/jcifs
String msg = req.getHeader("Authorization");
if (msg != null && msg.startsWith("NTLM ")) {
byte[] src = Base64.decode(msg.substring(5));
if (src[8] == 1) {
Type1Message type1 = new Type1Message(src);
代码示例来源:origin: org.samba.jcifs/jcifs
String msg = req.getHeader("Authorization");
if (msg != null && msg.startsWith("NTLM ")) {
byte[] src = Base64.decode(msg.substring(5));
if (src[8] == 1) {
Type1Message type1 = new Type1Message(src);
代码示例来源:origin: io.cloudslang.content/cs-http-client
public String generateType3Msg(final String username, final String password,
final String domain, final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException("Invalid NTLM type 2 message", exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags = type2Flags
& (~(NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message = new Type3Message(type2Message, password, domain,
username, workstation, type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: io.cloudslang.content/score-http-client
public String generateType3Msg(final String username, final String password,
final String domain, final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException("Invalid NTLM type 2 message", exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags = type2Flags
& (~(NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message = new Type3Message(type2Message, password, domain,
username, workstation, type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: io.openscore.content/score-http-client
public String generateType3Msg(final String username, final String password,
final String domain, final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException("Invalid NTLM type 2 message", exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags = type2Flags
& (~(NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message = new Type3Message(type2Message, password, domain,
username, workstation, type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: CloudSlang/cs-actions
public String generateType3Msg(final String username, final String password,
final String domain, final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException("Invalid NTLM type 2 message", exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags = type2Flags
& (~(NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message = new Type3Message(type2Message, password, domain,
username, workstation, type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: org.codelibs.robot/s2robot
@Override
public String generateType3Msg(final String username,
final String password, final String domain,
final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException("Invalid NTLM type 2 message",
exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags = type2Flags
& (0xffffffff ^ (NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message = new Type3Message(type2Message,
password, domain, username, workstation, type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: org.codelibs.robot/s2-robot
@Override
public String generateType3Msg(final String username,
final String password, final String domain,
final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException(
"Invalid NTLM type 2 message",
exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags =
type2Flags
& (0xffffffff ^ (NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message =
new Type3Message(
type2Message,
password,
domain,
username,
workstation,
type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: org.seasar.robot/s2-robot
@Override
public String generateType3Msg(final String username,
final String password, final String domain,
final String workstation, final String challenge)
throws NTLMEngineException {
Type2Message type2Message;
try {
type2Message = new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException(
"Invalid NTLM type 2 message",
exception);
}
final int type2Flags = type2Message.getFlags();
final int type3Flags =
type2Flags
& (0xffffffff ^ (NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
final Type3Message type3Message =
new Type3Message(
type2Message,
password,
domain,
username,
workstation,
type3Flags);
return Base64.encode(type3Message.toByteArray());
}
}
代码示例来源:origin: com.github.apetrelli.scafa/scafa-server
if (authenticate.startsWith("NTLM ")) {
String base64 = authenticate.substring(5);
Type2Message message2 = new Type2Message(Base64.decode(base64));
Type3Message message3 = new Type3Message(message2, password, domain, username, null,
message2.getFlags());
内容来源于网络,如有侵权,请联系作者删除!