Encrypt decrypt file

I am doing project I want some file in format which will not make sense to anyone who opens file. I have seen many java application which
has .bin .bok etc format. How to do that Please suggest me.

By how much is the file size increasing? Depending on how you do the actual encryption, it can easily grow a bit due to varying headers and some padding, but it shouldn't be a significant part of the file size if the file is reasonably big.
If, however, the file size grows by some significant factor (say your output is 2 time the size of the input), then there is some problem that you should look into.

Similar Messages

  • Memory does not get released after encrypting/ decrypting files.

    I am using javax.crypto package to encypt/decrypt files but the problem is that once a big file (around 100- 700 mb) is encrypted there is spike in memory of 70 Mb (first time) and whole of this memory is not released after execution is finished. I have kept my application run for days but this memory do not come down.
    Interesting thing is if I encrpyt/ decrypt the same file again and again the memory do not rise by 70 Mb, but for first 3-4 iterations 5-8 Mb of memory is released in each iteration and after that memory starts increasing again in chunk of 2-5 Mb and after few iteration some memory get released but in all the memory always increases. The code to encrypt file is simple
    Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding");
    byte[] salt = generateRandomBytes(16);
    Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes("123456", salt, 1000);
    SecretKey key = new SecretKeySpec(rfc.getBytes(32), "AES");
    c.init(Cipher.ENCRYPT_MODE, key );
    FileOutputStream fos = new FileOutputStream(encryptedFile);
    CipherOutputStream cos = new CipherOutputStream(fos);
    FileInputStream fis = new FileInputStream(largeInputFile);
    int len = 0;
    byte[] buf = new byte[1024 * 128];
    while((len = fis.read(buf)) != -1) {
       cos.write(buf, 0, len);
    cos.close();
    fis.close();
    This is simple observation I have seen in my program:
    I am using Windows 7 64 bit with 16 GB RAM Intel Core 2 Duo 3.00 GHz and file encrypted was 700 MB size
    Explanation
    Memory Usage (As shown in Windows Task Manager Private Working Set column)
    When program starts
    9924 K
    After first iteration of encryption
    81,180 K
    Second Iteration
    78,254 K
    3 Iteration
    74,614 K
    4 Iteration
    69,523 K
    5 Iteration
    72,256 K
    6 Iteration
    70,152 K
    7 Iteration
    83,327 K
    8 Iteration
    85,613 K
    9 Iteration
    95,124 K
    10 Iteration
    92,698 K
    11 Iteration
    94,670 K
    I kept the iteration on for 2000 iteration, the same pattern was observed and at the end memory usage 184,951 K, this memory was not released after calling System.gc() also.
    What could be the possible problem, is it the CipherOutputStream or Cipher class having some memory leak or I am doing something wrong here?

    ash wrote:
    We are using WebLogic Server 7.0 runing on Solaris 2.7.
    We are experiencing a problem where the memory does not seem to be released after
    the application has been shut down.What do you mean by "application has been shut down"? Is the server
    process running or not? Is it a zombie?
    The
    Unix 'top' command reports that memory has not been reclaimed by the O/S. What exactly has it reported? If the process is gone, then I'm pretty
    sure your O/S has reclaimed the memory. What exactly are you looking at
    in top?
    -- Rob
    > Continue
    restarting it will forces us to reboot the server as there will be more and more
    memory lost when restarting the WebLogic.
    Advice to fix the problem is much appreciated. Thanks.

  • Encryption/Decryption  failure for pdf and MSWord files

    Hi,
    Is there anybody to help me to find out what is wrong with my class (listing below)? I am sucessfuly using this class to encrypt and decrypt txt, html files but for unknown reasons I am unable to use it for e.g. pdf files. The encrypion somehow works but any atempt to decrypt is a failure.
    /* This class accepts an input file, encrypts/decrypts it using DES algorithm and
    writes the encrypted/decrypted output to an output file. DES is used in Cipher
    Block Chaining mode with PKCS5Padding padding scheme. Note that DES is a symmetric
    block cipher that uses 64-bit keys for encryption. A password of length no less
    than 8 is to be passed to the encryptFile/ decryptFile methods. This password is
    used to generate the encryption key. All exception handling is to be done by
    calling methods. These exceptions are thrown by encryptFile/ decryptFile methods.
    The input buffer is 64 bytes, 8 times the key size.
    import java.io.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import java.security.spec.*;
    public class Crypto
    public Crypto(FileInputStream inStream_, FileOutputStream outStream_)
    fInputStream_ = inStream_;
    fOutputStream_ = outStream_;
    public void encryptFile(String password_) throws InvalidKeySpecException, InvalidKeyException,
    InvalidAlgorithmParameterException, IllegalStateException, IOException, Exception
    DataOutputStream dataOutStream_ = new DataOutputStream(fOutputStream_);
    // key generation
    SecretKey encryptKey_ = createEncryptionKey(password_);
    // Cipher initialization
    Cipher cipher_= Cipher.getInstance(cipherType);
    cipher_.init(Cipher.ENCRYPT_MODE, encryptKey_);
    // write initialization vector to output
    byte[] initializationVector_ = cipher_.getIV();
    dataOutStream_.writeInt(initializationVector_.length);
    dataOutStream_.write(initializationVector_);
    // start reading from input and writing encrypted data to output
    while (true) {
    inputLength_ = fInputStream_.read(input_);
    if (inputLength_ ==-1) break;
    byte[] output_ = cipher_.update(input_, inputOffset_, inputLength_);
    if (output_ != null)
    dataOutStream_.write(output_);
    // finalize encryption and wrap up
    byte[] output_ = cipher_.doFinal();
    if (output_ != null)
    dataOutStream_.write(output_);
    fInputStream_.close();
    dataOutStream_.flush();
    dataOutStream_.close();
    public void decryptFile(String password_) throws IllegalStateException, IOException, Exception
    DataInputStream dataInStream_ = new DataInputStream(fInputStream_);
    // key generation
    SecretKey encryptKey_ = createEncryptionKey(password_);
    // read initialization vector from input
    int ivSize_ = dataInStream_.readInt();
    byte[] initializationVector_ = new byte[ivSize_];
    dataInStream_.readFully(initializationVector_);
    IvParameterSpec ivParamSpec_= new IvParameterSpec(initializationVector_);
    // Cipher initialization
    Cipher cipher_= Cipher.getInstance("DES/CBC/PKCS5Padding");
    cipher_.init(Cipher.DECRYPT_MODE, encryptKey_, ivParamSpec_);
    // start reading from input and writing decrypted data to output
    while (true) {
    inputLength_ = fInputStream_.read(input_);
    if (inputLength_ ==-1) break;
    byte[] output_ = cipher_.update(input_, inputOffset_, inputLength_);
    if (output_ != null)
    fOutputStream_.write(output_);
    // finalize decryption and wrap up
    byte[] output_ = cipher_.doFinal();
    if (output_ != null)
    fOutputStream_.write(output_);
    fInputStream_.close();
    fOutputStream_.flush();
    fOutputStream_.close();
    // the following method creates the encryption key using the supplied password
    private SecretKey createEncryptionKey(String passwd_) throws InvalidKeySpecException,
    InvalidKeyException, NoSuchAlgorithmException
    byte[] encryptionKeyData_ = passwd_.getBytes();
    DESKeySpec encryptionKeySpec_ = new DESKeySpec(encryptionKeyData_);
    SecretKeyFactory keyFactory_ = SecretKeyFactory.getInstance(algorithm_);
    SecretKey encryptionKey_ = keyFactory_.generateSecret(encryptionKeySpec_);
    return encryptionKey_;
    private FileInputStream fInputStream_;
    private FileOutputStream fOutputStream_;
    private final String algorithm_= "DES";
    private final String cipherType= "DES/CBC/PKCS5Padding";
    private byte[] input_ = new byte[64]; // The input buffer size is 64
    private int inputLength_;
    private final int inputOffset_= 0;
    }

    Please can u give me refined code for me///
    at [email protected]
    Hi,
    I found at least one thing wrong. In the decrypt
    method you are reading from 'fInputStream_' rather
    than 'dataInStream'.
    Worked for me on MSWord after changing this!
    Roger
    // start reading from input and writing decrypted
    ted data to output
    while (true) {
    inputLength_ = fInputStream_.read(input_);
    if (inputLength_ ==-1) break;
    byte[] output_ = cipher_.update(input_,
    input_, inputOffset_, inputLength_);
    if (output_ != null)
    fOutputStream_.write(output_);

  • Encrypt/Decrypt a file

    I would like to encrypt/decrypt a binary file (not text based) in FLEX 3.4 (AIR). I went through the forum, but I did not found any samples on how to do this. Any idea or help is appreciated.
    Thanks in advanced.

    Take a look at Crypto or ASCrypt3
    http://code.google.com/p/as3crypto/
    http://ascrypt3.riaforge.org/index.cfm

  • Encrypt/Decrypt pdf files in adobe air applications

    Hi Friends
    I want to encrypt and decrypt pdf files in adobe air application. I tried it many ways but am not getting it right method.
    Please help me this situation.

    AFAIK, Adobe Acrobat has features to add security to pdf file, but as for decrypt pdf files, you need to give the password. For example, Adobe Acrobat 9 standard.  Decrypting pdf seems not the issue of acrobat. You can find proper version of Acrobat to encrypt your file, whereas decrypt pdf document, you need to turn to a pdf password removing program to achieve that.

  • Encrypt & Decrypt XML files

    Hi All,
    I am new to the cryptography. I have one application which will transfer XML files from the machines which uses Windows/Java platform to the machines which uses Linux/C and also vice versa.
    I want to encrypt the files before transfer and decrypt the files after transfer on both the sides. Is there a common technology for handling this? Any info? Thanks in adv.
    -Bh_t_76

    So, I thought of getting ideas from the people who
    have already done similar work. I think the forums
    are meant for that. The topic is too broad. The forums are normally for specific problems and your request requires at least one book as an answer.
    If you know nothing about encryption then you need to find and read books on the subject. Not just Java books, but general encryption books. There are plenty out there of various standards.
    One of the books in my library is http://www.schneier.com/book-applied.html but you may want to start with something a little less weighty. Visit http://www.crypteon.co.uk/cryptography-books.htm to get some ideas.
    Once you have a basic understanding of modern cryptography then study the JCE tutorial and come back with specific questions.

  • Encrypt and Decrypt files using PGP and GPG

    Dear members, We have a customer that need to process files received through sFTP, FTPs and FTP over SSL encrypted with PGP and GPG methods.
    We Know that those encryption Method are not supported out of the box in Oracle SOA Suite and WCC but We need to Know if some of you have some workaround about that, maybe using a valve in FTP adapter, B2B or any other method in WCC.
    Thanks in advance

    >
    Meiying Yang wrote:
    > I have scenarions FTP-->ABAP proxy and ABAP proxy --> FTP. I need to put and get encrypted files to and from FTP server. Does anybody know how I can decrypt file when I get it from FTP server and encrypt file before I send to FTP server? Thanks.
    Hi,
    Have a look at these blogs.It would be helpful.
    1. SAP XI/PI Encode Outgoing Payload using Adapter Module
    /people/farooq.farooqui3/blog/2008/09/24/sap-xipi-encode-outgoing-payload-using-adapter-module
    2. Decode Base64 Incoming Encoded information in SAP XI/PI using Java Mapping
    /people/farooq.farooqui3/blog/2008/05/22/decode-base64-incoming-encoded-information-in-sap-xipi-using-java-mapping
    Regards,
    Chandra

  • Hi Freinds......How to Encrypt/Decrypt Text file in j2me

    Hello friendz.,,
    I m having problem with textfile exncryption decryption in j2me..
    Can abybode tell me how to encrypt/decrypt Text file using J2ME API's.......
    PLZ help me .......
    Thanx in advance
    regards,
    Parag

    http://www.mobilefish.com/developer/bouncycastle/bouncycastle.html
    http://www-128.ibm.com/developerworks/library/j-midpds.html

  • Encrypt/decrypt same file with two different passwords

    Hi everyone:
    I'm quite new to Java and cryptography in general and have a theoretical question. Is the following scenario possible and how would it be implemented:
    Two users with two passwords (say, a regular user and a superuser) encrypt, decrypt, read from and write to the same file. The secret key for encryption and decryption should be based on their passwords (generated from their passwords), i.e. not stored anywhere on the system.
    I've been racking my brains but can't think of a way. Am I missing an obvious solution?
    Can it be done?
    Thanks,
    Michael

    I don't think you can avoid having more than just a password hash stored on the system. Using a combination of my approach and Jeff's approach I can implement this as long as you allow a password protected key store to be stored on each system. A given user's key store would contain his RSA private key and associated public key together with the admin user's RSA certificate (thought the admin user's public key could be stored in the program since it does not have to be kept private). The admin user's key store would contain only his RSA private and public keys.
    Assume that the data file is to be create by a standard non-admin user. His code performs the following actions -
    1) Generates a random symmetric algorithm key. Say a 128 bit AES key.
    2) He write a digest of this to the output file.
    3) He writes the random key encrypted with his public key to the file.
    4) He writes his public key (or certificate) to the file.
    5) He writes the random key encrypted with the admin users public key to the file.
    6) He encrypts the data using the random key writes the result to the file.
    This user can then update the file by
    1) reading from the file the digest of the random key.
    2) reading the random key encrypted with his public key.
    3) Decrypting this encrypted random key using his private key extracted from his keystore.
    4) Check the digest of this key to make sure he has the correct random key.
    5) skipping his certificate and the random key encrypted using the admin user's public key.
    5) Decrypting the data using the random key.
    6) Update the data.
    7) Re-encrypt the file as described in the first part using a new random key.
    The admin user can
    1) read from the file the digest of the random key.
    2) skip the random key encrypted using the user's public key.
    3) reading the user's public key from the file (for use later if the file needs to be updated).
    4) read the random key encrypted using the admin's public key.
    5) decrypting the random key using the admin's private key obtained from his key store.
    6) check the digest of the random key to make sure it is correct.
    7) decrypt the the data.
    The admin can edit the data since he can re-encrypt the data in a similar manner to the way it was created in the first place.

  • Encryption/decryption through jar file and classes

    Hi,
    My application uses tomcat as web server.
    I am doing encrytion and decyption.
    i fetch encypted data from database and then decrypt it
    If i use calsses in webapps -> WEB-INF -> classes folder, i place classes in that ,
    In other case i use jar file and place that file in WEB-INF -> lib folder in the webapps directory.
    There is huge performance difference.
    While using classes performance is great while using jar file performance is very disappointed.
    I am using a file for encryption /decryption also.

    Are you getting any error messages? Have you put debugging code in those classes to see what is happening?

  • Best method for encrypting/decrypting large XML files ( 100MB)

    I am in need of encrypting XML for large part files that can get upwards of 100Mb+.
    I found some articles and code, but the only example I was successful in getting to work used XMLCipher, which takes a Document, parses it, and then encrypts it.
    Obviously, 100Mb files do not cooperate well with DOM, so I want to find a better method for encryption/decryption of these files.
    I found some articles using a CipherInputStream and CipherOutputStreams, but am not clear if this is the way to go and if this will avoid memory errors.
    import java.io.*;
    import java.security.spec.AlgorithmParameterSpec;
    import javax.crypto.*;
    import javax.crypto.spec.IvParameterSpec;
    public class DesEncrypter {
        Cipher ecipher;
        Cipher dcipher;
        public DesEncrypter(SecretKey key) {
            // Create an 8-byte initialization vector
            byte[] iv = new byte[]{
                (byte)0x8E, 0x12, 0x39, (byte)0x9C,
                0x07, 0x72, 0x6F, 0x5A
            AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv);
            try {
                ecipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
                dcipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
                // CBC requires an initialization vector
                ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
            } catch (java.security.InvalidAlgorithmParameterException e) {
            } catch (javax.crypto.NoSuchPaddingException e) {
            } catch (java.security.NoSuchAlgorithmException e) {
            } catch (java.security.InvalidKeyException e) {
        // Buffer used to transport the bytes from one stream to another
        byte[] buf = new byte[1024];
        public void encrypt(InputStream in, OutputStream out) {
            try {
                // Bytes written to out will be encrypted
                out = new CipherOutputStream(out, ecipher);
                // Read in the cleartext bytes and write to out to encrypt
                int numRead = 0;
                while ((numRead = in.read(buf)) >= 0) {
                    out.write(buf, 0, numRead);
                out.close();
            } catch (java.io.IOException e) {
        public void decrypt(InputStream in, OutputStream out) {
            try {
                // Bytes read from in will be decrypted
                in = new CipherInputStream(in, dcipher);
                // Read in the decrypted bytes and write the cleartext to out
                int numRead = 0;
                while ((numRead = in.read(buf)) >= 0) {
                    out.write(buf, 0, numRead);
                out.close();
            } catch (java.io.IOException e) {
    }This looks like it might fit, but there is one more twist, I am using a persistence manager and xml encoding to accomplish that, so I am not sure how (where) to implement this method without affecting persistence.
    Any guidance on what would work best in this situation would be appreciated.
    Regards,
    vbplayr2000

    I can give some general guidelines that might help, having done much similar work:
    You have 2 different issues, at least from my reading of your problem:
    1) How to deal with large XML docs that most parsers will not handle without memory issues
    2) Where to hide or "black box" the encrypt/decrypt routines
    #1: Check into XPP3/XMLPull. Yes, it's different that the other XML parsers you are used to using, and more work is involved, but it is blazing fast and can be used to parse a stream as it is being read. You can populate beans and process as needed since there is really not much "inversion of control" involved compared to parsers that go on to finish the entire document or load it all into memory.
    #2: Extend Serializable and write your own readObject/writeObject methods. Place the encrypt/decrypt in there as appropriate. That will "hide" the implementation and should be what any persistence manager can deal with.
    Regards,
    antarti

  • Need To Open An Encrypted PDF File That I Created.  No Password.

    I have Acrobat 8.  I created a document and then tried to put security on it.  Now I cannot even open the document.  It gives me the message:  "You do not have access rights to the encrypted document."  I never entered a password or anything.  I need to get this document reopened.  Also, I pasted some JPEG signatures into the document.  My reason for security measures was to make sure nobody could edit the document and right click and save as the signature JPEG.  First thing first- getting the document opened.  Then let me know how to just make it so that someone can only read and print the document and not be able to edit any typewriter insertions.  PLEASE HELP!!!!

    Hi Dom,
    Let's start with Certificate Security is not the same as Password Security. If you had encrypted the PDF file using Password Security, then whatever password you used to lock the document you would use to unlock the document. It's pretty straight forward, and in the cryptography world it would be know as symmetrical security in that you use the same key (password) to lock and unlock the file. Think of it as using a key to lock your front door to your house when you leave and the exact same key to unlock the door when you return, that's what symmetrical security is.
    Certificate security is a totally different beast. Certificate Security uses asymmetrical encryption meaning there are two different keys involved, a public key and its corresponding private key. When these keys are generated there is a voodoo that goes on that gives these two keys a symbiotic relationship in that (and this is the basic tenet of asymmetrical encryption) what one key locks only its corresponding other key can unlock. Either key can lock (really encrypt) something and only its corresponding other key can unlock (decrypt) it once it's been locked. Of these two seemingly magical keys one is designated as a private key that only the key owner has access to, and the other is designated as a public key that the whole world has access to. If you lock something with your private key then only its corresponding public key can unlock it, and yes that means that not even the private key can unlock it. You can also lock something using the public key in which case only the corresponding private key can successfully unlock it.
    When you encrypt (think of that as "lock") a PDF file using Certificate Security you are encrypting the file using one or more public keys. That is, you encrypt the file for a list of recipients where each recipient has provided you with their public key and they in turn will decrypt the document using their private key. The number of recipients is theoretically limitless, but practically there is a limit in that each recipient you include will cause the file size to grow a little and at some point you'd make the file size too large for the computer to handle, but for the sake of our discussion think unlimited number of recipients. When you encrypted the file you were asked to select a recipient. If you don't also select yourself as a recipient then you end up locking yourself out of the file, and that's exactly what happened in your case. I see from above that you are using version 8, but I believe it was version 9 where we added the warning to make sure to add yourself as a recipient so as to not lock yourself out of the file (I can't remember if it was version 8 or 9, but since you didn't mention that warning I'll assume that we didn't add the warning until 9).
    Unless you added yourself at the time you encrypted the file there is no going back to add yourself later because if you can't open the file you can't edit the file. You are locked out forever. You could ask the person that you included as a recipient to see if they can open the file and remove security, but you would have had to make them a document owner when you encrypted the file. If you restricted their editing capabilities then they won't be able to remove security, but at least you could see the contents of the file.
    I know this has all been a bit geeky, and I haven't gone into how to procure a public/private key pair, but I don't want to dump too much data on you in one post. If you need more information let me know and I'll be glad to provide it.
    Steve

  • How to resolve bug RC4 encrypt-decrypt on iPAD with AIR15 only

    Hi everybody,
    I have some trouble with AIR15 only, In the past, I created a small game on iPad It could send or receive messge from server. I used lib as3crypto.swc encrypt or decrypt message (RC4). But when I upgrade to AIR15 encrypt-decrypt cannot work ( Another thing about this crash is that it only happens with a release (adhoc or appstore) build but NOT with a debug build). I check so many time but i don't know what is problem here.
    Please help me, thanks so much any advice.
    P/S: My game have many swf files (code and resource). I must combine multiple SWF files into one.
    Class RC4.as
    import com.hurlant.crypto.prng.ARC4;
    import com.hurlant.util.Base64;
    import com.hurlant.util.Hex;
    import flash.utils.ByteArray;
    public class RC4
      private static const key:String = "keytest";
      private static var byteKeys:ByteArray = Hex.toArray(Hex.fromString(key));
      private static var rc4:ARC4 = new ARC4();
      public static function encrypt(clearText:String):String
      var byteText:ByteArray = Hex.toArray(Hex.fromString(clearText));
      rc4.init(byteKeys);
      rc4.encrypt(byteText);
      return Base64.encodeByteArray(byteText);
    public static function decrypt(encryptedText:String):String
      var byteText:ByteArray = Base64.decodeToByteArray(encryptedText);
      rc4.init(byteKeys);
      rc4.decrypt(byteText);
      return Hex.toString(Hex.fromArray(byteText));

    Sorry, exact message is "this movie could not be played".
    There are hundreds of posts about this message but no one states a clear solution to the problem.
    Your help will be much appreciated.
    Thank you.

  • Help ! Need PCI Encryption/Decryption Controller Driver for New HP 355 G2 (AMD) w/Win 7 Pro 64 Bit

    Just rebuilt new HP 355 G2 to Win 7 64 bit.  The ONLY driver I can not locate or get to work is the PCI Encryption/Decryption Controller. I installed all latest drivers for this model/OS from both HP and AMD sites still no luck. AMD autodetect utility and Catalyst software installed all other drivers successfully except this one and when completes says all drivers, including chipset, are installed successfully and current.
    I am at a complete loss where to get this driver from a OEM site, can you help ?
    Device ID's:
    PCI\VEN_1022&DEV_1537&SUBSYS_15371022&REV_00
    PCI\VEN_1022&DEV_1537&SUBSYS_15371022
    PCI\VEN_1022&DEV_1537&CC_108000
    PCI\VEN_1022&DEV_1537&CC_1080
    Thanks !!!
    This question was solved.
    View Solution.

    Hi:
    You need to run this driver and then manually install it.
    http://h20565.www2.hp.com/hpsc/swd/public/detail?swItemId=vc_133833_1
    To manually install the driver go to the device manager and click on the PCI Encryption/Decryption Controller needing the driver.
    Click on the driver tab.  Click on Update Driver.
    Select the Browse my computer for driver software option, and browse to the driver folder that was created when you ran the file.
    That folder will be located in C:\SWSetup\sp66974.
    Make sure the Include Subfolders box is checked, and the driver should install.
    Then reboot.

  • Security Handler to use Adobe's Standard to Encypt and Decrypt File

    Hello,
    I am trying to write an Adobe Acrobat Security Handler plug-in based on the sample provided by Adobe.
    Within the plugin source code - a CRYPT_KEY of 'Mickey' is used to encrypt/decrypt the document once the security handler is placed on the document.
    Is there a way to use Adobe's CRYPT_KEY? Or what do I pass back from the callback function NewCryptDataExProc - so that a document with Adobe's encryption/decryption is used on the file?
    The main goal is such that the document needs my security handler plugin to open/view the document. Please note that we know the open password and the owner password that we set on the file.
    Thanks in advance for any advice and information anyone can provide.

    We are trying require the user to have our plugin to open the PDFs that we supply them. If we use Adobe security - then anyone who know's the password can open the files. Now, there isn't anything to prevent them from sending along the plugin also - but that is another issue.
    We would like to use the plugin to set the security on the file before the user gets the file - but the file is coming from another division and they are currenty unable to spend the time to update their process to include the that step. But, the files are set with Standard Adobe security. We are however able to tweek the PDF file, in the trailer, to recognize that our Security Handler is to be used.
    So, when our security handler kicks in - it doesn't send back the appropriate 'key' to Acrobat and all the pages come up blank.
    This is a temporary messure. We are currently getting a plan together to use Adobe Life Cycle (DRM), but the hardware acquision and other beauracy is keeping that from materializing for a few months and we need something yesterday (as my boss says).
    If you have any guidance or suggestions - that would be welcome.

Maybe you are looking for