Package totalcross.crypto.cipher
Class RSACipher
- java.lang.Object
-
- totalcross.crypto.cipher.Cipher
-
- totalcross.crypto.cipher.RSACipher
-
public class RSACipher extends Cipher
This class implements the RSA cryptographic cipher.
-
-
Field Summary
-
Fields inherited from class totalcross.crypto.cipher.Cipher
chaining, CHAINING_CBC, CHAINING_ECB, CHAINING_NONE, iv, key, nativeHeap, operation, OPERATION_DECRYPT, OPERATION_ENCRYPT, padding, PADDING_NONE, PADDING_PKCS1, PADDING_PKCS5
-
-
Constructor Summary
Constructors Constructor Description RSACipher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoReset()protected voidfinalize()java.lang.StringgetAlgorithm()Returns the name of the algorithm.intgetBlockLength()Returns the block length.protected booleanisChainingSupported(int chaining)protected booleanisKeySupported(Key key, int operation)protected booleanisPaddingSupported(int padding)protected byte[]process(byte[] data)
-
-
-
Method Detail
-
getAlgorithm
public final java.lang.String getAlgorithm()
Returns the name of the algorithm.- Specified by:
getAlgorithmin classCipher- Returns:
- "RSA".
-
getBlockLength
public final int getBlockLength()
Returns the block length.- Specified by:
getBlockLengthin classCipher- Returns:
- Always returns 0.
-
doReset
protected final void doReset() throws NoSuchAlgorithmException, CryptoException- Specified by:
doResetin classCipher- Throws:
NoSuchAlgorithmExceptionCryptoException
-
process
protected final byte[] process(byte[] data) throws CryptoException- Specified by:
processin classCipher- Throws:
CryptoException
-
isKeySupported
protected final boolean isKeySupported(Key key, int operation)
- Specified by:
isKeySupportedin classCipher
-
isChainingSupported
protected final boolean isChainingSupported(int chaining)
- Specified by:
isChainingSupportedin classCipher
-
isPaddingSupported
protected final boolean isPaddingSupported(int padding)
- Specified by:
isPaddingSupportedin classCipher
-
finalize
protected final void finalize()
- Overrides:
finalizein classjava.lang.Object
-
-