org.neodatis.odb.impl.core.layers.layer3.crypto
Class AesMd5Cypher

java.lang.Object
  extended by org.neodatis.odb.impl.core.layers.layer3.crypto.AesMd5Cypher
All Implemented Interfaces:
IO

public class AesMd5Cypher
extends java.lang.Object
implements IO

Author:
osmadja

Field Summary
(package private)  long currentPosition
           
(package private)  javax.crypto.Cipher decipher
           
(package private)  javax.crypto.Cipher encipher
           
 
Constructor Summary
AesMd5Cypher()
           
 
Method Summary
 void close()
           
 void flushIO()
           
 void init(java.lang.String fileName, boolean canWrite, java.lang.String password)
           
 boolean isLocked()
           
 long length()
           
 boolean lockFile()
           
 int read()
           
 long read(byte[] bytes, int offfset, int size)
          TODO check offste, it is not being used
 void seek(long position)
           
 boolean unlockFile()
           
 void write(byte b)
           
 void write(byte[] bytes, int offset, int size)
          TODO check offset, it is not being used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPosition

long currentPosition

decipher

javax.crypto.Cipher decipher

encipher

javax.crypto.Cipher encipher
Constructor Detail

AesMd5Cypher

public AesMd5Cypher()
Method Detail

init

public void init(java.lang.String fileName,
                 boolean canWrite,
                 java.lang.String password)
          throws java.lang.Exception
Specified by:
init in interface IO
Throws:
java.lang.Exception

close

public void close()
           throws java.io.IOException
Specified by:
close in interface IO
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Specified by:
read in interface IO
Throws:
java.io.IOException

read

public long read(byte[] bytes,
                 int offfset,
                 int size)
          throws java.io.IOException
TODO check offste, it is not being used

Specified by:
read in interface IO
Throws:
java.io.IOException

seek

public void seek(long position)
          throws java.io.IOException
Specified by:
seek in interface IO
Throws:
java.io.IOException

write

public void write(byte b)
           throws java.io.IOException
Specified by:
write in interface IO
Throws:
java.io.IOException

write

public void write(byte[] bytes,
                  int offset,
                  int size)
           throws java.io.IOException
TODO check offset, it is not being used

Specified by:
write in interface IO
Throws:
java.io.IOException

length

public long length()
            throws java.io.IOException
Specified by:
length in interface IO
Throws:
java.io.IOException

lockFile

public boolean lockFile()
                 throws java.io.IOException
Specified by:
lockFile in interface IO
Throws:
java.io.IOException

isLocked

public boolean isLocked()
                 throws java.io.IOException
Specified by:
isLocked in interface IO
Throws:
java.io.IOException

unlockFile

public boolean unlockFile()
                   throws java.io.IOException
Specified by:
unlockFile in interface IO
Throws:
java.io.IOException

flushIO

public void flushIO()
             throws java.io.IOException
Specified by:
flushIO in interface IO
Throws:
java.io.IOException