Ciao mj, Imageio which is the base for the mechanism we use to read/write raster uses particulart streams that adhere to these two contracts:
http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/stream/ImageInputStream.html for Input http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/stream/ImageOutputStream.html for output Strange enough the hierarcy for these streams have not such a thing like a FilterInputStream. In 2.3.x I started to improve these streams by adding new high-performance ones. One of the thing that I am trying to do (when I have time or someone pays or helps :-) ) is to introduce the decorator pattern much like for FilterInputStream. If you look in the GeoTools source tree under gt-2.3.x\ext\coverage_development\imageio\customstreams you will find a complex eclipse project for managing and improving ImaIO streams. The classes of interest for you are it.geosolutions.imageio.stream.input.FilterImageInputStream it.geosolutions.imageio.stream.output.FilterImageOutputStream The starting point for you would be writing a simple decorator based on this two classes which just use a Cipher much like CipherOutputStream and CipherInputStream. Once we get this working I will find a way to let you decrypt/encrypt wahtever you want in geotools! Well at least some geotiff files.... :-) Simone. On 11/13/06, mj <[EMAIL PROTECTED]> wrote: > Simone Giannecchini ha scritto: > > Ciao mj, > > well if the question is if it possible to decrypt a geotiff on the fly > > using the actual GeoTiffReader (2.3.x and above) the answer is yeah > > (ok, I have to check but I am pretty positive :-) ). You would have to > > create your own ImageInputStream outside the reader using a > > CypherInputStream. > > > > However the point here is not the GeoTiffReader but how ImageIO > > manages stream. It has its own stack of streams implementing the > > ImageInputStream interface, hence the best thing to do would be > > writing a dedicate ImageInputStream that uses the decorator > > pattern (much like FilterInputStream) to decrypt the image on the fly > > with highest performances. Once we are there we could even do the > > converse that is writing an ImageOutputStream that does the opposite. > > If you are interested we can find a way to implement this pretty > > quickly. > > > > > > Regards, > > Simone. > > > > > > > > > > On 11/13/06, mj <[EMAIL PROTECTED]> wrote: > >> Hello, > >> I encrypted a Image with javax.crypto, is possible pass to the > >> GeoTiffReader a Cipher class to decrypt the image. > >> > >> Thanks > >> > >> Mario > >> > >> > >> ------------------------------------------------------------------------- > >> > >> Using Tomcat but need to do more? Need to support web services, > >> security? > >> Get stuff done quickly with pre-integrated technology to make your > >> job easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> _______________________________________________ > >> Geotools-gt2-users mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > >> > > > > > Ciao, > yes I am interessed in an ImageInputStream /ImageOutputStream for teh > encryption/decryption of images. > How I can contribute to help you?. > > Regards > > Mario > > -- ------------------------------------------------------- Eng. Simone Giannecchini President /CEO GeoSolutions http://www.geo-solutions.it ------------------------------------------------------- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
