Encrypting and Decrypting a File with Tasker

48 views
Skip to first unread message

Zohar

unread,
Jan 18, 2020, 11:16:20 AM1/18/20
to Tasker
Hi


I asked about it in the past, and there was no way to do it,
since several years passed, hopefully now there is one.


I need to Encrypt and Decrypt a file, on my device,
is there a way to do it now with Tasker?


Thank you

Robert Ryan

unread,
Jan 18, 2020, 2:19:39 PM1/18/20
to tas...@googlegroups.com
Directly including encryption functions in Tasker puts it in danger of being banned in those countries where restrictive encryption laws are in place. This is a legal battle that no single developer is in a position to wage. 

That being said, it is possibe to do this yourself using Java Function actions. All the building blocks are there, you just need to put them together. 

I would start here

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/db082d3a-d0aa-45f8-a69a-d37ee79255d7%40googlegroups.com.

Zohar

unread,
Jan 19, 2020, 6:45:46 AM1/19/20
to Tasker
Hi Robert Ryan


Thank you very much.

Tasker's Java Function action can call any Java function in Android's API?
That's amazing..

The link you gave contains several examples, outof which, the first 2 are exatly what I wish to do:
Encrypt a file, and Decrypt a file.

But the code there assumes some Enums are visible in the scope of the code, which obviously we do not have in Tasker,
so what should I do?

Maybe there is an example code, with the Java Function action in Tasker, for Encrypt and Decrypt a file?

Robert Ryan

unread,
Jan 19, 2020, 12:23:34 PM1/19/20
to tas...@googlegroups.com
On January 19, 2020 4:45:53 AM Zohar <zoh...@gmail.com> wrote:
But the code there assumes some Enums are visible in the scope of the code, which obviously we do not have in Tasker,
so what should I do?

That's the major hurdle, finding the information in Android's complex documentation. You'd have to find out the actual values of these enums and use that. TBH, this would be way above my capabilities. 

Is there a reason that you need to do this with Tasker? If you just need file encryption I would recommend OpenKeychain. It might even be easier to automate that with AutoInput than build it yourself. 

Maybe there is an example code, with the Java Function action in Tasker, for Encrypt and Decrypt a file?

This is uncharted territory. I don't think anyone has actually done this.

Zohar

unread,
Jan 19, 2020, 2:34:23 PM1/19/20
to Tasker
I see..
OK I will use an external tool in that case..
Thank you
Reply all
Reply to author
Forward
0 new messages