| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>Base64 (Apache Shiro :: Lang 1.10.1 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.min.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Base64 (Apache Shiro :: Lang 1.10.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"><!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* We explicitly disable cookie tracking to avoid privacy issues */ _paq.push(['disableCookies']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo.privacy.apache.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '2']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Base64.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.shiro.codec</a></div> |
| <h2 title="Class Base64" class="title">Class Base64</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.codec.Base64</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public class <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.39">Base64</a> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre> |
| <div class="block">Provides <a href="http://en.wikipedia.org/wiki/Base64">Base 64</a> encoding and decoding as defined by |
| <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>. |
| <p/> |
| This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose |
| Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein. |
| <p/> |
| This class was borrowed from Apache Commons Codec SVN repository (rev. 618419) with modifications |
| to enable Base64 conversion without a full dependency on Commons Codec. We didn't want to reinvent the wheel of |
| great work they've done, but also didn't want to force every Shiro user to depend on the commons-codec.jar |
| <p/> |
| As per the Apache 2.0 license, the original copyright notice and all author and copyright information have |
| remained in tact.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.9</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="http://en.wikipedia.org/wiki/Base64">Wikipedia: Base 64</a>, |
| <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Base64</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decode(byte%5B%5D)">decode</a></span>​(byte[] base64Data)</code></th> |
| <td class="colLast"> |
| <div class="block">Decodes Base64 data into octets</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decode(java.lang.String)">decode</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> base64Encoded)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts the specified UTF-8 Base64 encoded String and decodes it to a raw Base64 decoded byte array.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decodeToString(byte%5B%5D)">decodeToString</a></span>​(byte[] base64Encoded)</code></th> |
| <td class="colLast"> |
| <div class="block">Decodes the specified Base64 encoded byte array and returns the decoded result as a UTF-8 encoded.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decodeToString(java.lang.String)">decodeToString</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> base64Encoded)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts the specified UTF-8 Base64 encoded String and decodes it to a resultant UTF-8 encoded string.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#encode(byte%5B%5D)">encode</a></span>​(byte[] pArray)</code></th> |
| <td class="colLast"> |
| <div class="block">Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#encode(byte%5B%5D,boolean)">encode</a></span>​(byte[] binaryData, |
| boolean isChunked)</code></th> |
| <td class="colLast"> |
| <div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#encodeChunked(byte%5B%5D)">encodeChunked</a></span>​(byte[] binaryData)</code></th> |
| <td class="colLast"> |
| <div class="block">Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#encodeToString(byte%5B%5D)">encodeToString</a></span>​(byte[] bytes)</code></th> |
| <td class="colLast"> |
| <div class="block">Base64 encodes the specified byte array and then encodes it as a String using Shiro's preferred character |
| encoding (UTF-8).</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBase64(byte%5B%5D)">isBase64</a></span>​(byte[] arrayOctect)</code></th> |
| <td class="colLast"> |
| <div class="block">Tests a given byte array to see if it contains only valid characters within the Base64 alphabet.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Base64</h4> |
| <pre>public <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.39">Base64</a>()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="isBase64(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isBase64</h4> |
| <pre class="methodSignature">public static boolean <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.178">isBase64</a>​(byte[] arrayOctect)</pre> |
| <div class="block">Tests a given byte array to see if it contains only valid characters within the Base64 alphabet.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arrayOctect</code> - byte array to test</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if all bytes are valid characters in the Base64 alphabet or if the byte array is |
| empty; false, otherwise</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="encodeToString(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>encodeToString</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.232">encodeToString</a>​(byte[] bytes)</pre> |
| <div class="block">Base64 encodes the specified byte array and then encodes it as a String using Shiro's preferred character |
| encoding (UTF-8).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>bytes</code> - the byte array to Base64 encode.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a UTF-8 encoded String of the resulting Base64 encoded byte array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="encodeChunked(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>encodeChunked</h4> |
| <pre class="methodSignature">public static byte[] <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.243">encodeChunked</a>​(byte[] binaryData)</pre> |
| <div class="block">Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>binaryData</code> - binary data to encodeToChars</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Base64 characters chunked in 76 character blocks</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="encode(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>encode</h4> |
| <pre class="methodSignature">public static byte[] <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.253">encode</a>​(byte[] pArray)</pre> |
| <div class="block">Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pArray</code> - a byte array containing binary data</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A byte array containing only Base64 character data</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="encode(byte[],boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>encode</h4> |
| <pre class="methodSignature">public static byte[] <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.265">encode</a>​(byte[] binaryData, |
| boolean isChunked)</pre> |
| <div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>binaryData</code> - Array containing binary data to encodeToChars.</dd> |
| <dd><code>isChunked</code> - if <code>true</code> this encoder will chunk the base64 output into 76 character blocks</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Base64-encoded data.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - Thrown when the input array needs an output array bigger than <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink"><code>Integer.MAX_VALUE</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="decodeToString(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>decodeToString</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.390">decodeToString</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> base64Encoded)</pre> |
| <div class="block">Converts the specified UTF-8 Base64 encoded String and decodes it to a resultant UTF-8 encoded string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>base64Encoded</code> - a UTF-8 Base64 encoded String</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the decoded String, UTF-8 encoded.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="decodeToString(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>decodeToString</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.401">decodeToString</a>​(byte[] base64Encoded)</pre> |
| <div class="block">Decodes the specified Base64 encoded byte array and returns the decoded result as a UTF-8 encoded.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>base64Encoded</code> - a Base64 encoded byte array</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the decoded String, UTF-8 encoded.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="decode(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>decode</h4> |
| <pre class="methodSignature">public static byte[] <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.412">decode</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> base64Encoded)</pre> |
| <div class="block">Converts the specified UTF-8 Base64 encoded String and decodes it to a raw Base64 decoded byte array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>base64Encoded</code> - a UTF-8 Base64 encoded String</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the raw Base64 decoded byte array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="decode(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>decode</h4> |
| <pre class="methodSignature">public static byte[] <a href="../../../../src-html/org/apache/shiro/codec/Base64.html#line.423">decode</a>​(byte[] base64Data)</pre> |
| <div class="block">Decodes Base64 data into octets</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>base64Data</code> - Byte array containing Base64 data</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Array containing decoded data.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Base64.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2004–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |