Code Monkey home page Code Monkey logo

Comments (11)

siyengar avatar siyengar commented on August 24, 2024

Taking a look

from conceal.

simekadam avatar simekadam commented on August 24, 2024

have you seen the link on bitucket, which I've posted to SO?
https://bitbucket.org/simekadam/securedfileprovider

from conceal.

siyengar avatar siyengar commented on August 24, 2024

Thanks for the link. That helps.

from conceal.

simekadam avatar simekadam commented on August 24, 2024

You should be able to build it with gradle (at least I hope so:) //no buck support though:)

from conceal.

siyengar avatar siyengar commented on August 24, 2024

I think i know what the issue is here: https://bitbucket.org/simekadam/securedfileprovider/src/26c2cd3b8154dace8621527260562af9e4bdb4b0/SecuredFileProvider/src/main/java/eu/inmite/android/securedfileprovider/SecuredFileProvider.java?at=master#cl-134 you aren't closing the stream.

This is required for multiple reasons:

  1. It's good in general otherwise you're leaking file descriptors
  2. We write out the integrity tag on close()

from conceal.

simekadam avatar simekadam commented on August 24, 2024

Compiling..that's definitely an issue, but shouldn't it throw the exception while writing the file?
Update..You;re awesome, that was the issue..Gonna smash my head against the wall now..
Thank you!

from conceal.

siyengar avatar siyengar commented on August 24, 2024

Thanks (y) Its hard to throw when close() isn't called. We can do finalizers but I'd rather not use a finalizer since it isn't reliable.

from conceal.

simekadam avatar simekadam commented on August 24, 2024

I got it. I just was under the impression that writing to the file completed ok and haven't searched fo the issue there at all:/ Especially silly as I have been trying like ten different ways how to stream the input.
..So I guess conceal wasn't able to determine I wrote all the bits of the file and wasn't able to compute some checksum and probably wrote those result bit to the fail..Than while decrypting after I closed the stream it wasn't able to verify those checksum..

from conceal.

ashish-kshirsagar avatar ashish-kshirsagar commented on August 24, 2024

I am looking for a similar approach. I am unable to access the link https://bitbucket.org/simekadam/securedfileprovider . Can you provide me permission.? Or can someone share the solution they have. I am actually facing an issue with sharing image files and opening those in android gallery, where I get exception as PIPE closed. Unable to open imaged in gallery but same works with other (not all) image viewing apps. Thanks in advance.

from conceal.

yasirramadan avatar yasirramadan commented on August 24, 2024

I have the same problem and cannot find any solution , also i am not able to access the link https://bitbucket.org/simekadam/securedfileprovider so please how could i get permission to access that link ?

from conceal.

simekadam avatar simekadam commented on August 24, 2024

I'm sorry guys that code already isn't available.
Long story short the issue was, that I didn't close the stream properly in one case. Fixing that fixed that problem. Only partially though.
Sometimes it seems like those other apps aren't closing streams properly?? And then it fails. Or they just might read the data in some weird way.

from conceal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.