Java Code Examples for org.apache.shiro.codec.Base64#decodeToString()
The following examples show how to use
org.apache.shiro.codec.Base64#decodeToString() .
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: MD5.java From spring-boot-demo with MIT License | 4 votes |
public static String decodeBase64(String str) { return Base64.decodeToString(str); }
Example 2
Source File: CryptographyUtil.java From songjhh_blog with Apache License 2.0 | 4 votes |
public static String decBase64(String str) { return Base64.decodeToString(str); }
Example 3
Source File: EndecryptUtil.java From LazyREST with Apache License 2.0 | 2 votes |
/** * base64进制解密 * * @param content * @return */ public static String decryptBase64(String content) { Preconditions.checkArgument(!Strings.isNullOrEmpty(content), "消息摘要不能为空"); return Base64.decodeToString(content); }
Example 4
Source File: BasicHttpAuthenticationFilter.java From tapestry-security with Apache License 2.0 | 2 votes |
/** * Returns the username and password pair based on the specified <code>encoded</code> String obtained from * the request's authorization header. * <p/> * Per RFC 2617, the default implementation first Base64 decodes the string and then splits the resulting decoded * string into two based on the ":" character. That is: * <p/> * <code>String decoded = Base64.decodeToString(encoded);<br/> * return decoded.split(":");</code> * * @param scheme the {@link #getAuthcScheme() authcScheme} found in the request * {@link #getAuthzHeader(javax.servlet.ServletRequest) authzHeader}. It is ignored by this implementation, * but available to overriding implementations should they find it useful. * @param encoded the Base64-encoded username:password value found after the scheme in the header * @return the username (index 0)/password (index 1) pair obtained from the encoded header data. */ protected String[] getPrincipalsAndCredentials(String scheme, String encoded) { String decoded = Base64.decodeToString(encoded); return decoded.split(":"); }