| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0_65) on Tue Feb 25 18:15:47 EST 2014 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| DefaultBlockCipherService (Apache Shiro 1.2.3 API) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2014-02-25"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DefaultBlockCipherService (Apache Shiro 1.2.3 API)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DefaultBlockCipherService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/shiro/crypto/CryptoException.html" title="class in org.apache.shiro.crypto"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/shiro/crypto/DefaultBlockCipherService.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="DefaultBlockCipherService.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.shiro.crypto</FONT> |
| <BR> |
| Class DefaultBlockCipherService</H2> |
| <PRE> |
| <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto">org.apache.shiro.crypto.JcaCipherService</A> |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/shiro/crypto/AbstractSymmetricCipherService.html" title="class in org.apache.shiro.crypto">org.apache.shiro.crypto.AbstractSymmetricCipherService</A> |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.shiro.crypto.DefaultBlockCipherService</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/shiro/crypto/CipherService.html" title="interface in org.apache.shiro.crypto">CipherService</A></DD> |
| </DL> |
| <DL> |
| <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/shiro/crypto/AesCipherService.html" title="class in org.apache.shiro.crypto">AesCipherService</A>, <A HREF="../../../../org/apache/shiro/crypto/BlowfishCipherService.html" title="class in org.apache.shiro.crypto">BlowfishCipherService</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public class <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.133"><B>DefaultBlockCipherService</B></A><DT>extends <A HREF="../../../../org/apache/shiro/crypto/AbstractSymmetricCipherService.html" title="class in org.apache.shiro.crypto">AbstractSymmetricCipherService</A></DL> |
| </PRE> |
| |
| <P> |
| Base abstract class for block cipher algorithms. |
| |
| <h2>Usage</h2> |
| Note that this class exists mostly to simplify algorithm-specific subclasses. Unless you understand the concepts of |
| cipher modes of operation, block sizes, and padding schemes, and you want direct control of these things, you should |
| typically not uses instances of this class directly. Instead, algorithm-specific subclasses, such as |
| <A HREF="../../../../org/apache/shiro/crypto/AesCipherService.html" title="class in org.apache.shiro.crypto"><CODE>AesCipherService</CODE></A>, <A HREF="../../../../org/apache/shiro/crypto/BlowfishCipherService.html" title="class in org.apache.shiro.crypto"><CODE>BlowfishCipherService</CODE></A>, and others are usually better suited for regular use. |
| <p/> |
| However, if you have the need to create a custom block cipher service where no sufficient algorithm-specific subclass |
| exists in Shiro, this class would be very useful. |
| |
| <h2>Configuration</h2> |
| Block ciphers can accept configuration parameters that direct how they operate. These parameters concatenated |
| together in a single String comprise what the JDK JCA documentation calls a |
| <a href="http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#trans">transformation |
| string</a>. We think that it is better for Shiro to construct this transformation string automatically based on its |
| constituent parts instead of having the end-user construct the string manually, which may be error prone or |
| confusing. To that end, Shiro <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html" title="class in org.apache.shiro.crypto"><CODE>DefaultBlockCipherService</CODE></A>s have attributes that can be set individually in |
| a type-safe manner based on your configuration needs, and Shiro will build the transformation string for you. |
| <p/> |
| The following sections typically document the configuration options for block (byte array) |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A> method invocations. Streaming configuration |
| for those same attributes are done via mirrored <code>streaming</code>* attributes, and their purpose is identical, but |
| they're only used during streaming <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.encrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A> and |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.decrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A> methods. See the "Streaming" |
| section below for more. |
| |
| <h3>Block Size</h3> |
| The block size specifies the number of bits (not bytes) that the cipher operates on when performing an operation. |
| It can be specified explicitly via the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setBlockSize(int)"><CODE>blockSize</CODE></A> attribute. If not set, the JCA Provider |
| default will be used based on the cipher algorithm. Block sizes are usually very algorithm specific, so set this |
| value only if you know you don't want the JCA Provider's default for the desired algorithm. For example, the |
| AES algorithm's Rijndael implementation <em>only</em> supports a 128 bit block size and will not work with any other |
| size. |
| <p/> |
| Also note that the <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setInitializationVectorSize(int)"><CODE>initializationVectorSize</CODE></A> is usually the same as the |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setBlockSize(int)"><CODE>blockSize</CODE></A> in block ciphers. If you change either attribute, you should ensure that the other |
| attribute is correct for the target cipher algorithm. |
| |
| <h3>Operation Mode</h3> |
| You may set the block cipher's<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">mode of |
| operation</a> via the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setMode(org.apache.shiro.crypto.OperationMode)"><CODE>mode</CODE></A> attribute, which accepts a type-safe |
| <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum instance. This type safety helps avoid typos when specifying the mode and |
| guarantees that the mode name will be recognized by the underlying JCA Provider. |
| <p/> |
| <b>*</b>If no operation mode is specified, Shiro defaults all of its block <code>CipherService</code> instances to the |
| <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#CBC"><CODE>CBC</CODE></A> mode, specifically to support auto-generation of initialization vectors during |
| encryption. This is different than the JDK's default <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#ECB"><CODE>ECB</CODE></A> mode because <code>ECB</code> does |
| not support initialization vectors, which are necessary for strong encryption. See the |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto"><CODE>JcaCipherService parent class</CODE></A> class JavaDoc for an extensive |
| explanation on why we do this and why we do not use the Sun <code>ECB</code> default. You also might also want read |
| the <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29">Wikipedia |
| section on ECB<a/> and look at the encrypted image to see an example of why <code>ECB</code> should not be used in |
| security-sensitive environments. |
| <p/> |
| In the rare case that you need to override the default with a mode not represented |
| by the <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum, you may specify the raw mode name string that will be recognized by your JCA |
| provider via the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setModeName(java.lang.String)"><CODE>modeName</CODE></A> attribute. Because this is not type-safe, it is recommended only to |
| use this attribute if the <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum does not represent your desired mode. |
| <p/> |
| <b>NOTE:</b> If you change the mode to one that does not support initialization vectors (such as |
| <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#ECB"><CODE>ECB</CODE></A> or <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#NONE"><CODE>NONE</CODE></A>), you <em>must</em> turn off auto-generated |
| initialization vectors by setting <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setGenerateInitializationVectors(boolean)"><CODE>generateInitializationVectors</CODE></A> |
| to <code>false</code>. Abandoning initialization vectors significantly weakens encryption, so think twice before |
| disabling this feature. |
| |
| <h3>Padding Scheme</h3> |
| Because block ciphers process messages in fixed-length blocks, if the final block in a message is not equal to the |
| block length, <a href="http://en.wikipedia.org/wiki/Padding_(cryptography)">padding</a> is applied to match that |
| size to maintain the total length of the message. This is good because it protects data patterns from being |
| identified - when all chunks look the same length, it is much harder to infer what that data might be. |
| <p/> |
| You may set a padding scheme via the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><CODE>paddingScheme</CODE></A> attribute, which |
| accepts a type-safe <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto"><CODE>PaddingScheme</CODE></A> enum instance. Like the <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum, |
| this enum offers type safety to help avoid typos and guarantees that the mode will be recongized by the underlying |
| JCA provider. |
| <p/> |
| <b>*</b>If no padding scheme is specified, this class defaults to the <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html#PKCS5"><CODE>PaddingScheme.PKCS5</CODE></A> scheme, specifically |
| to be compliant with the default behavior of auto-generating initialization vectors during encryption (see the |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto"><CODE>JcaCipherService parent class</CODE></A> class JavaDoc for why). |
| <p/> |
| In the rare case that you need to override the default with a scheme not represented by the <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto"><CODE>PaddingScheme</CODE></A> |
| enum, you may specify the raw padding scheme name string that will be recognized by your JCA provider via the |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><CODE>paddingSchemeName</CODE></A> attribute. Because this is not type-safe, it is recommended only to |
| use this attribute if the <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto"><CODE>PaddingScheme</CODE></A> enum does not represent your desired scheme. |
| |
| <h2>Streaming</h2> |
| Most people don't think of using block ciphers as stream ciphers, since their name implies working |
| with block data (i.e. byte arrays) only. However, block ciphers can be turned into byte-oriented stream ciphers by |
| using an appropriate <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>operation mode</CODE></A> with a <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingBlockSize()"><CODE>streaming block size</CODE></A> |
| of 8 bits. This is why the <A HREF="../../../../org/apache/shiro/crypto/CipherService.html" title="interface in org.apache.shiro.crypto"><CODE>CipherService</CODE></A> interface provides both block and streaming operations. |
| <p/> |
| Because this streaming 8-bit block size rarely changes across block-cipher algorithms, default values have been set |
| for all three streaming configuration parameters. The defaults are: |
| <ul> |
| <li><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingBlockSize(int)"><CODE>streamingBlockSize</CODE></A> = <code>8</code> (bits)</li> |
| <li><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingMode(org.apache.shiro.crypto.OperationMode)"><CODE>streamingMode</CODE></A> = <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#CBC"><CODE>CBC</CODE></A></li> |
| <li><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><CODE>streamingPaddingScheme</CODE></A> = <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html#PKCS5"><CODE>PKCS5</CODE></A></li> |
| </ul> |
| <p/> |
| These attributes have the same meaning as the <code>mode</code>, <code>blockSize</code>, and <code>paddingScheme</code> attributes |
| described above, but they are applied during streaming method invocations only (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.encrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A> |
| and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.decrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A>). |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.0</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/apache/shiro/crypto/BlowfishCipherService.html" title="class in org.apache.shiro.crypto"><CODE>BlowfishCipherService</CODE></A>, |
| <A HREF="../../../../org/apache/shiro/crypto/AesCipherService.html" title="class in org.apache.shiro.crypto"><CODE>AesCipherService</CODE></A>, |
| <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Wikipedia: Block Cipher Modes of Operation</a></DL> |
| <HR> |
| |
| <P> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#DefaultBlockCipherService(java.lang.String)">DefaultBlockCipherService</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> algorithmName)</CODE> |
| |
| <BR> |
| Creates a new <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html" title="class in org.apache.shiro.crypto"><CODE>DefaultBlockCipherService</CODE></A> using the specified block cipher <code>algorithmName</code>.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected byte[]</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#generateInitializationVector(boolean)">generateInitializationVector</A></B>(boolean streaming)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getBlockSize()">getBlockSize</A></B>()</CODE> |
| |
| <BR> |
| Returns the block cipher's block size to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string or <code>0</code> if the JCA Provider default block size |
| for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getModeName()">getModeName</A></B>()</CODE> |
| |
| <BR> |
| Returns the cipher operation mode name (as a String) to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string or <code>null</code> if the JCA Provider default mode for |
| the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getPaddingSchemeName()">getPaddingSchemeName</A></B>()</CODE> |
| |
| <BR> |
| Returns the cipher algorithm padding scheme name (as a String) to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string or <code>null</code> if the JCA Provider default mode for |
| the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingBlockSize()">getStreamingBlockSize</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingModeName()">getStreamingModeName</A></B>()</CODE> |
| |
| <BR> |
| Same purpose as the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getModeName()"><CODE>modeName</CODE></A> attribute, but is used instead only for for streaming |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.encrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A> and |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.decrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A>).</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingPaddingSchemeName()">getStreamingPaddingSchemeName</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getTransformationString(boolean)">getTransformationString</A></B>(boolean streaming)</CODE> |
| |
| <BR> |
| Returns the transformation string to use with the <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true#getInstance(java.lang.String)" title="class or interface in javax.crypto"><CODE>Cipher.getInstance(java.lang.String)</CODE></A> call.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#isGenerateInitializationVectors(boolean)">isGenerateInitializationVectors</A></B>(boolean streaming)</CODE> |
| |
| <BR> |
| Overrides the parent implementation to ensure initialization vectors are always generated if streaming is |
| enabled (block ciphers <em>must</em> use initialization vectors if they are to be used as a stream cipher).</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setBlockSize(int)">setBlockSize</A></B>(int blockSize)</CODE> |
| |
| <BR> |
| Sets the block cipher's block size to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setMode(org.apache.shiro.crypto.OperationMode)">setMode</A></B>(<A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto">OperationMode</A> mode)</CODE> |
| |
| <BR> |
| Sets the cipher operation mode of operation to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setModeName(java.lang.String)">setModeName</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> modeName)</CODE> |
| |
| <BR> |
| Sets the cipher operation mode name to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)">setPaddingScheme</A></B>(<A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto">PaddingScheme</A> paddingScheme)</CODE> |
| |
| <BR> |
| Sets the padding scheme to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingSchemeName(java.lang.String)">setPaddingSchemeName</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> paddingSchemeName)</CODE> |
| |
| <BR> |
| Sets the padding scheme name to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider default mode for |
| the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingBlockSize(int)">setStreamingBlockSize</A></B>(int streamingBlockSize)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingMode(org.apache.shiro.crypto.OperationMode)">setStreamingMode</A></B>(<A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto">OperationMode</A> mode)</CODE> |
| |
| <BR> |
| Sets the transformation string mode to be used for streaming operations only.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingModeName(java.lang.String)">setStreamingModeName</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> streamingModeName)</CODE> |
| |
| <BR> |
| Sets the transformation string mode name to be used for streaming operations only.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingPaddingScheme(org.apache.shiro.crypto.PaddingScheme)">setStreamingPaddingScheme</A></B>(<A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto">PaddingScheme</A> scheme)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingPaddingSchemeName(java.lang.String)">setStreamingPaddingSchemeName</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> streamingPaddingSchemeName)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_org.apache.shiro.crypto.AbstractSymmetricCipherService"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.crypto.<A HREF="../../../../org/apache/shiro/crypto/AbstractSymmetricCipherService.html" title="class in org.apache.shiro.crypto">AbstractSymmetricCipherService</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="../../../../org/apache/shiro/crypto/AbstractSymmetricCipherService.html#generateNewKey()">generateNewKey</A>, <A HREF="../../../../org/apache/shiro/crypto/AbstractSymmetricCipherService.html#generateNewKey(int)">generateNewKey</A></CODE></TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_org.apache.shiro.crypto.JcaCipherService"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.crypto.<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto">JcaCipherService</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])">decrypt</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(java.io.InputStream, java.io.OutputStream, byte[])">decrypt</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])">encrypt</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(java.io.InputStream, java.io.OutputStream, byte[])">encrypt</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#ensureSecureRandom()">ensureSecureRandom</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()">getAlgorithmName</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getDefaultSecureRandom()">getDefaultSecureRandom</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getInitializationVectorSize()">getInitializationVectorSize</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getKeySize()">getKeySize</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getSecureRandom()">getSecureRandom</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getStreamingBufferSize()">getStreamingBufferSize</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#isGenerateInitializationVectors()">isGenerateInitializationVectors</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setGenerateInitializationVectors(boolean)">setGenerateInitializationVectors</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setInitializationVectorSize(int)">setInitializationVectorSize</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setKeySize(int)">setKeySize</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setSecureRandom(java.security.SecureRandom)">setSecureRandom</A>, <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setStreamingBufferSize(int)">setStreamingBufferSize</A></CODE></TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="DefaultBlockCipherService(java.lang.String)"><!-- --></A><H3> |
| DefaultBlockCipherService</H3> |
| <PRE> |
| public <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.164"><B>DefaultBlockCipherService</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> algorithmName)</PRE> |
| <DL> |
| <DD>Creates a new <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html" title="class in org.apache.shiro.crypto"><CODE>DefaultBlockCipherService</CODE></A> using the specified block cipher <code>algorithmName</code>. Per this |
| class's JavaDoc, this constructor also sets the following defaults: |
| <ul> |
| <li><code>streamingMode</code> = <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#CBC"><CODE>CBC</CODE></A></li> |
| <li><code>streamingPaddingScheme</code> = <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html#NONE"><CODE>none</CODE></A></li> |
| <li><code>streamingBlockSize</code> = 8</li> |
| </ul> |
| All other attributes are null/unset, indicating the JCA Provider defaults will be used. |
| <P> |
| <DL> |
| <DT><B>Parameters:</B><DD><CODE>algorithmName</CODE> - the block cipher algorithm to use when encrypting and decrypting</DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="getModeName()"><!-- --></A><H3> |
| getModeName</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.192"><B>getModeName</B></A>()</PRE> |
| <DL> |
| <DD>Returns the cipher operation mode name (as a String) to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string or <code>null</code> if the JCA Provider default mode for |
| the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingModeName()"><CODE>streamingModeName</CODE></A> attribute is used when the block cipher is used for |
| streaming operations. |
| <p/> |
| The default value is <code>null</code> to retain the JCA Provider default. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the cipher operation mode name (as a String) to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider default |
| mode for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setModeName(java.lang.String)"><!-- --></A><H3> |
| setModeName</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.218"><B>setModeName</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> modeName)</PRE> |
| <DL> |
| <DD>Sets the cipher operation mode name to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string. A <code>null</code> value indicates that the JCA Provider |
| default mode for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingModeName()"><CODE>streamingModeName</CODE></A> attribute is used when the block cipher is used for |
| streaming operations. |
| <p/> |
| The default value is <code>null</code> to retain the JCA Provider default. |
| <p/> |
| <b>NOTE:</b> most standard mode names are represented by the <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum. That enum |
| should be used with the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setMode(org.apache.shiro.crypto.OperationMode)"><CODE>mode</CODE></A> attribute when possible to retain type-safety and reduce the |
| possibility of errors. This method is better used if the <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum does not represent the |
| necessary mode. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>modeName</CODE> - the cipher operation mode name to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider |
| default mode for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setMode(org.apache.shiro.crypto.OperationMode)"><CODE>setMode(org.apache.shiro.crypto.OperationMode)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setMode(org.apache.shiro.crypto.OperationMode)"><!-- --></A><H3> |
| setMode</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.242"><B>setMode</B></A>(<A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto">OperationMode</A> mode)</PRE> |
| <DL> |
| <DD>Sets the cipher operation mode of operation to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string. A <code>null</code> value indicates that the JCA Provider |
| default mode for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingMode(org.apache.shiro.crypto.OperationMode)"><CODE>streamingMode</CODE></A> attribute is used when the block cipher is used for |
| streaming operations. |
| <p/> |
| If the <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> enum cannot represent your desired mode, you can set the name explicitly |
| via the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setModeName(java.lang.String)"><CODE>modeName</CODE></A> attribute directly. However, because <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto"><CODE>OperationMode</CODE></A> represents all |
| standard JDK mode names already, ensure that your underlying JCA Provider supports the non-standard name first. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>mode</CODE> - the cipher operation mode to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider |
| default mode for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getPaddingSchemeName()"><!-- --></A><H3> |
| getPaddingSchemeName</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.262"><B>getPaddingSchemeName</B></A>()</PRE> |
| <DL> |
| <DD>Returns the cipher algorithm padding scheme name (as a String) to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string or <code>null</code> if the JCA Provider default mode for |
| the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingPaddingSchemeName()"><CODE>streamingPaddingSchemeName</CODE></A> attribute is used when the block cipher is |
| used for streaming operations. |
| <p/> |
| The default value is <code>null</code> to retain the JCA Provider default. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the padding scheme name (as a String) to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider default |
| padding scheme for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setPaddingSchemeName(java.lang.String)"><!-- --></A><H3> |
| setPaddingSchemeName</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.289"><B>setPaddingSchemeName</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> paddingSchemeName)</PRE> |
| <DL> |
| <DD>Sets the padding scheme name to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider default mode for |
| the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingPaddingSchemeName()"><CODE>streamingPaddingSchemeName</CODE></A> attribute is used when the block cipher is |
| used for streaming operations. |
| <p/> |
| The default value is <code>null</code> to retain the JCA Provider default. |
| <p/> |
| <b>NOTE:</b> most standard padding schemes are represented by the <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto"><CODE>PaddingScheme</CODE></A> enum. |
| That enum should be used with the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><CODE>paddingScheme</CODE></A> attribute when possible to retain |
| type-safety and reduce the possibility of errors. Calling this method however is suitable if the |
| <code>PaddingScheme</code> enum does not represent the desired scheme. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>paddingSchemeName</CODE> - the padding scheme name to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA |
| Provider default padding scheme for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> |
| should be used.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><CODE>setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><!-- --></A><H3> |
| setPaddingScheme</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.314"><B>setPaddingScheme</B></A>(<A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto">PaddingScheme</A> paddingScheme)</PRE> |
| <DL> |
| <DD>Sets the padding scheme to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string. A <code>null</code> value indicates that the JCA Provider |
| default padding scheme for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setStreamingPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><CODE>streamingPaddingScheme</CODE></A> attribute is used when the block cipher is used for |
| streaming operations. |
| <p/> |
| If the <A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto"><CODE>PaddingScheme</CODE></A> enum does represent your desired scheme, you can set the name explicitly |
| via the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#setPaddingSchemeName(java.lang.String)"><CODE>paddingSchemeName</CODE></A> attribute directly. However, because |
| <code>PaddingScheme</code> represents all standard JDK scheme names already, ensure that your underlying JCA Provider |
| supports the non-standard name first. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>paddingScheme</CODE> - the padding scheme to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>null</code> if the JCA Provider |
| default padding scheme for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBlockSize()"><!-- --></A><H3> |
| getBlockSize</H3> |
| <PRE> |
| public int <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.334"><B>getBlockSize</B></A>()</PRE> |
| <DL> |
| <DD>Returns the block cipher's block size to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string or <code>0</code> if the JCA Provider default block size |
| for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingBlockSize()"><CODE>streamingBlockSize</CODE></A> attribute is used when the block cipher is used for |
| streaming operations. |
| <p/> |
| The default value is <code>0</code> which retains the JCA Provider default. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the block cipher block size to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>0</code> if the JCA Provider default |
| block size for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setBlockSize(int)"><!-- --></A><H3> |
| setBlockSize</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.357"><B>setBlockSize</B></A>(int blockSize)</PRE> |
| <DL> |
| <DD>Sets the block cipher's block size to be used when constructing |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string. <code>0</code> indicates that the JCA Provider default |
| block size for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used. |
| <p/> |
| This attribute is used <em>only</em> when constructing the transformation string for block (byte array) |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(byte[], byte[])"><CODE>JcaCipherService.encrypt(byte[], byte[])</CODE></A> and <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(byte[], byte[])"><CODE>JcaCipherService.decrypt(byte[], byte[])</CODE></A>). The |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getStreamingBlockSize()"><CODE>streamingBlockSize</CODE></A> attribute is used when the block cipher is used for |
| streaming operations. |
| <p/> |
| The default value is <code>0</code> which retains the JCA Provider default. |
| <p/> |
| <b>NOTE:</b> block cipher block sizes are very algorithm-specific. If you change this value, ensure that it |
| will work with the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>blockSize</CODE> - the block cipher block size to be used when constructing the |
| <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true" title="class or interface in javax.crypto"><CODE>Cipher</CODE></A> transformation string, or <code>0</code> if the JCA Provider |
| default block size for the specified <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getAlgorithmName()"><CODE>algorithm</CODE></A> should be used.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getStreamingModeName()"><!-- --></A><H3> |
| getStreamingModeName</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.374"><B>getStreamingModeName</B></A>()</PRE> |
| <DL> |
| <DD>Same purpose as the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getModeName()"><CODE>modeName</CODE></A> attribute, but is used instead only for for streaming |
| operations (<A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#encrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.encrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A> and |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#decrypt(java.io.InputStream, java.io.OutputStream, byte[])"><CODE>JcaCipherService.decrypt(java.io.InputStream, java.io.OutputStream, byte[])</CODE></A>). |
| <p/> |
| Note that unlike the <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getModeName()"><CODE>modeName</CODE></A> attribute, the default value of this attribute is not |
| <code>null</code> - it is <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#CBC"><CODE>CBC</CODE></A> for reasons described in the class-level JavaDoc in the |
| <code>Streaming</code> section. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the transformation string mode name to be used for streaming operations only.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setStreamingModeName(java.lang.String)"><!-- --></A><H3> |
| setStreamingModeName</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.390"><B>setStreamingModeName</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> streamingModeName)</PRE> |
| <DL> |
| <DD>Sets the transformation string mode name to be used for streaming operations only. The default value is |
| <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#CBC"><CODE>CBC</CODE></A> for reasons described in the class-level JavaDoc in the <code>Streaming</code> section. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>streamingModeName</CODE> - transformation string mode name to be used for streaming operations only</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setStreamingMode(org.apache.shiro.crypto.OperationMode)"><!-- --></A><H3> |
| setStreamingMode</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.406"><B>setStreamingMode</B></A>(<A HREF="../../../../org/apache/shiro/crypto/OperationMode.html" title="enum in org.apache.shiro.crypto">OperationMode</A> mode)</PRE> |
| <DL> |
| <DD>Sets the transformation string mode to be used for streaming operations only. The default value is |
| <A HREF="../../../../org/apache/shiro/crypto/OperationMode.html#CBC"><CODE>CBC</CODE></A> for reasons described in the class-level JavaDoc in the <code>Streaming</code> section. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>mode</CODE> - the transformation string mode to be used for streaming operations only</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getStreamingPaddingSchemeName()"><!-- --></A><H3> |
| getStreamingPaddingSchemeName</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.410"><B>getStreamingPaddingSchemeName</B></A>()</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setStreamingPaddingSchemeName(java.lang.String)"><!-- --></A><H3> |
| setStreamingPaddingSchemeName</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.414"><B>setStreamingPaddingSchemeName</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> streamingPaddingSchemeName)</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setStreamingPaddingScheme(org.apache.shiro.crypto.PaddingScheme)"><!-- --></A><H3> |
| setStreamingPaddingScheme</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.420"><B>setStreamingPaddingScheme</B></A>(<A HREF="../../../../org/apache/shiro/crypto/PaddingScheme.html" title="enum in org.apache.shiro.crypto">PaddingScheme</A> scheme)</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getStreamingBlockSize()"><!-- --></A><H3> |
| getStreamingBlockSize</H3> |
| <PRE> |
| public int <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.424"><B>getStreamingBlockSize</B></A>()</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setStreamingBlockSize(int)"><!-- --></A><H3> |
| setStreamingBlockSize</H3> |
| <PRE> |
| public void <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.428"><B>setStreamingBlockSize</B></A>(int streamingBlockSize)</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getTransformationString(boolean)"><!-- --></A><H3> |
| getTransformationString</H3> |
| <PRE> |
| protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.444"><B>getTransformationString</B></A>(boolean streaming)</PRE> |
| <DL> |
| <DD>Returns the transformation string to use with the <A HREF="http://java.sun.com/javase/6/docs/api/javax/crypto/Cipher.html?is-external=true#getInstance(java.lang.String)" title="class or interface in javax.crypto"><CODE>Cipher.getInstance(java.lang.String)</CODE></A> call. If |
| <code>streaming</code> is <code>true</code>, a block-cipher transformation string compatible with streaming operations will |
| be constructed and cached for re-use later (see the class-level JavaDoc for more on using block ciphers |
| for streaming). If <code>streaming</code> is <code>false</code> a normal block-cipher transformation string will |
| be constructed and cached for later re-use. |
| <P> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#getTransformationString(boolean)">getTransformationString</A></CODE> in class <CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto">JcaCipherService</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>streaming</CODE> - if the transformation string is going to be used for a Cipher performing stream-based encryption or not. |
| <DT><B>Returns:</B><DD>the transformation string</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isGenerateInitializationVectors(boolean)"><!-- --></A><H3> |
| isGenerateInitializationVectors</H3> |
| <PRE> |
| protected boolean <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.506"><B>isGenerateInitializationVectors</B></A>(boolean streaming)</PRE> |
| <DL> |
| <DD>Overrides the parent implementation to ensure initialization vectors are always generated if streaming is |
| enabled (block ciphers <em>must</em> use initialization vectors if they are to be used as a stream cipher). If |
| not being used as a stream cipher, then the value is computed based on whether or not the currently configured |
| <A HREF="../../../../org/apache/shiro/crypto/DefaultBlockCipherService.html#getModeName()"><CODE>modeName</CODE></A> is compatible with initialization vectors as well as the result of the configured |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#setGenerateInitializationVectors(boolean)"><CODE>generateInitializationVectors</CODE></A> value. |
| <P> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#isGenerateInitializationVectors(boolean)">isGenerateInitializationVectors</A></CODE> in class <CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto">JcaCipherService</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>streaming</CODE> - whether or not streaming is being performed |
| <DT><B>Returns:</B><DD><code>true</code> if streaming or a value computed based on if the currently configured mode is compatible |
| with initialization vectors.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="generateInitializationVector(boolean)"><!-- --></A><H3> |
| generateInitializationVector</H3> |
| <PRE> |
| protected byte[] <A HREF="../../../../src-html/org/apache/shiro/crypto/DefaultBlockCipherService.html#line.511"><B>generateInitializationVector</B></A>(boolean streaming)</PRE> |
| <DL> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html#generateInitializationVector(boolean)">generateInitializationVector</A></CODE> in class <CODE><A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto">JcaCipherService</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DefaultBlockCipherService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/shiro/crypto/CryptoException.html" title="class in org.apache.shiro.crypto"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/shiro/crypto/JcaCipherService.html" title="class in org.apache.shiro.crypto"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/shiro/crypto/DefaultBlockCipherService.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="DefaultBlockCipherService.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2004-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |