de.unikassel.android.sdcframework.util
Class RSAFileEncryptionStrategy

Package class diagram package RSAFileEncryptionStrategy
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.RSAFileEncryptionStrategy
All Implemented Interfaces:
FileEncryptionStrategy

public class RSAFileEncryptionStrategy
extends Object
implements FileEncryptionStrategy

Implementation of the RSA file encryption strategy.


Field Summary
private  PublicKey key
          The public key for encryption
 
Constructor Summary
RSAFileEncryptionStrategy(PublicKey key)
          Constructor
 
Method Summary
 boolean encryptFile(File srcFile, File destFile)
          Encryption method
 String getAlgorithmLetterCode()
          Getter for a related three letter code describing the algorithm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private final PublicKey key
The public key for encryption

Constructor Detail

RSAFileEncryptionStrategy

public RSAFileEncryptionStrategy(PublicKey key)
Constructor

Parameters:
key - the public key for encryption
Method Detail

encryptFile

public boolean encryptFile(File srcFile,
                           File destFile)
Description copied from interface: FileEncryptionStrategy
Encryption method

Specified by:
encryptFile in interface FileEncryptionStrategy
Parameters:
srcFile - the source file to encrypt
destFile - the destination file
Returns:
true if successful, false otherwise

getAlgorithmLetterCode

public String getAlgorithmLetterCode()
Description copied from interface: FileEncryptionStrategy
Getter for a related three letter code describing the algorithm

Specified by:
getAlgorithmLetterCode in interface FileEncryptionStrategy
Returns:
true if successful, false otherwise