Ejemplo n.º 1
0
        public EncryptionVerifier(DocumentInputStream dis, int encryptedLength)
        {
            int saltSize = dis.ReadInt();

            if (saltSize != 16)
                throw new Exception("Salt size != 16 !?");

            salt = new byte[16];
            dis.ReadFully(salt);
            verifier = new byte[16];
            dis.ReadFully(verifier);

            verifierHashSize = dis.ReadInt();

            verifierHash = new byte[encryptedLength];
            dis.ReadFully(verifierHash);

            spinCount = 50000;
            algorithm = EncryptionHeader.ALGORITHM_AES_128;
            cipherMode = EncryptionHeader.MODE_ECB;
            encryptedKey = null;
        }
Ejemplo n.º 2
0
 public virtual void ReadFully(byte[] buf, int off, int len)
 {
     delegate1.ReadFully(buf, off, len);
 }