Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
public final class: RSACipher [javadoc | source]
java.lang.Object
   javax.crypto.CipherSpi
      com.sun.crypto.provider.RSACipher
RSA cipher implementation. Supports RSA en/decryption and signing/verifying using PKCS#1 v1.5 padding and without padding (raw RSA). Note that raw RSA is supported mostly for completeness and should only be used in rare cases. Objects should be instantiated by calling Cipher.getInstance() using the following algorithm names: . "RSA/ECB/PKCS1Padding" (or "RSA") for PKCS#1 padding. The mode (blocktype) is selected based on the en/decryption mode and public/private key used . "RSA/ECB/NoPadding" for rsa RSA. We only do one RSA operation per doFinal() call. If the application passes more data via calls to update() or doFinal(), we throw an IllegalBlockSizeException when doFinal() is called (see JCE API spec). Bulk encryption using RSA does not make sense and is not standardized. Note: RSA keys should be at least 512 bits long
Constructor:
 public RSACipher() 
Method from com.sun.crypto.provider.RSACipher Summary:
engineDoFinal,   engineDoFinal,   engineGetBlockSize,   engineGetIV,   engineGetKeySize,   engineGetOutputSize,   engineGetParameters,   engineInit,   engineInit,   engineInit,   engineSetMode,   engineSetPadding,   engineUnwrap,   engineUpdate,   engineUpdate,   engineWrap
Methods from javax.crypto.CipherSpi:
a,   engineDoFinal,   engineDoFinal,   engineDoFinal,   engineGetBlockSize,   engineGetIV,   engineGetKeySize,   engineGetOutputSize,   engineGetParameters,   engineInit,   engineInit,   engineInit,   engineSetMode,   engineSetPadding,   engineUnwrap,   engineUpdate,   engineUpdate,   engineUpdate,   engineWrap
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.RSACipher Detail:
 protected byte[] engineDoFinal(byte[] in,
    int inOfs,
    int inLen) throws BadPaddingException, IllegalBlockSizeException 
 protected int engineDoFinal(byte[] in,
    int inOfs,
    int inLen,
    byte[] out,
    int outOfs) throws ShortBufferException, BadPaddingException, IllegalBlockSizeException 
 protected int engineGetBlockSize() 
 protected byte[] engineGetIV() 
 protected int engineGetKeySize(Key key) throws InvalidKeyException 
 protected int engineGetOutputSize(int inputLen) 
 protected AlgorithmParameters engineGetParameters() 
 protected  void engineInit(int opmode,
    Key key,
    SecureRandom random) throws InvalidKeyException 
 protected  void engineInit(int opmode,
    Key key,
    AlgorithmParameterSpec params,
    SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException 
 protected  void engineInit(int opmode,
    Key key,
    AlgorithmParameters params,
    SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException 
 protected  void engineSetMode(String mode) throws NoSuchAlgorithmException 
 protected  void engineSetPadding(String paddingName) throws NoSuchPaddingException 
 protected Key engineUnwrap(byte[] wrappedKey,
    String algorithm,
    int type) throws InvalidKeyException, NoSuchAlgorithmException 
 protected byte[] engineUpdate(byte[] in,
    int inOfs,
    int inLen) 
 protected int engineUpdate(byte[] in,
    int inOfs,
    int inLen,
    byte[] out,
    int outOfs) 
 protected byte[] engineWrap(Key key) throws InvalidKeyException, IllegalBlockSizeException