I think its better to ask the user for the secret key rather than storin it
smwhere.
On Wed, Aug 26, 2009 at 4:30 PM, zeeshan wrote:
>
> Hi Dear,
>
> i wrote a small application which encrypt some files using a secret
> key.
> i need to decrypt files on 2nd run which requires same key again
> pl
encryption and decryption is the app's internal functionality. user
has nothing to do with this
i encrypt the file on 1st run and on 2nd run i check if file is there
then decrypt and show.
so only thing i understand is to store the key somewhere in the app so
i can access it for decryption.
just w
If it is only used by ur application, jus use a String instance to hold the
key. y store in a file??
ll the key change dynamically???
On Wed, Aug 26, 2009 at 4:55 PM, zeeshan wrote:
>
> encryption and decryption is the app's internal functionality. user
> has nothing to do with this
> i encrypt
key doesn't change.
can i store keyString in preferences to retrieve for decryption
SecretKey key = KeyGenerator.getInstance("DES").generateKey();
byte[] keybytes = key.getEncoded();
String keyString = new String(keybytes);
or plz provide any example for the best practic
On Wed, Aug 26, 2009 at 5:41 PM, zeeshan wrote:
>
> key doesn't change.
> can i store keyString in preferences to retrieve for decryption
yes that'd be better than storin it in a file. But better to jus have a
constant field in ur class that cointains ur key.
>
>
> SecretKey key = KeyGenerator
key never change once its been created.
as i know SecretKey generates by a funtion as above, how can i set it
as constant
can you plz provide example?
On Aug 26, 1:39 pm, Sujay Krishna Suresh
wrote:
> On Wed, Aug 26, 2009 at 5:41 PM, zeeshan wrote:
>
> > key doesn't change.
> > can i store key
On Wed, Aug 26, 2009 at 7:16 PM, zeeshan wrote:
>
> key never change once its been created.
>
> as i know SecretKey generates by a funtion as above, how can i set it
> as constant
> can you plz provide example?
>
>
> On Aug 26, 1:39 pm, Sujay Krishna Suresh
> wrote:
> > On Wed, Aug 26, 2009 at
why can't you store it in a SharedPreferences ?
On Aug 26, 7:33 am, Sujay Krishna Suresh
wrote:
> On Wed, Aug 26, 2009 at 7:16 PM, zeeshan wrote:
>
> > key never change once its been created.
>
> > as i know SecretKey generates by a funtion as above, how can i set it
> > as constant
> > can you
The more important question I think is why are you doing this, what
information are you trying to protect?
It seems like you're adding encryption for the sake of it, but in fact
your solution won't be much more secure against someone determined to
get at the file's contents. If the key is static,
i am just protecting some images (about 500) i downloaded on sdcard.
on the first run it downloads and write each by CipherOutputStream and
for the next time it decrypt those images by CipherInputStream.
a static key works at the moment
On Aug 26, 3:07 pm, Haravikk wrote:
> The more important qu
Isn't java byte code remarkeably easy to reverse engineer into source
code using one of many free java decompilers?
>From my understanding, even using an obfuscator on the byte code (if
that is possible with android implementation) isn't terrible effective
at preventing decompilers from doing a g
It just depends on how much the images are worth and how much the
decryption costs the unauthorized party. If the images are not worth
much (hypothetically speaking, of course), then decompiling the
application isn't worth it. If on the other hand, the images will land
you in jail (again, hypothet
12 matches
Mail list logo