[BETA/OS] File Cryptography - File Encryption and Decryption

1.Introduction

Extension Name: File Cryptography
With the help of this extension, you can encrypt and decrypt files using AES Algorithm and 128bit Key (16 Characters). Key must be 16 characters, If not It will call onEncrypt/DecryptFail event.

2.Blocks

Events

image

Methods

image

3.Documentation

Events

  • AfterEncrypt
    Event raised after encrypting the file.
    component_event (2)
    inputfile ~ text
    outputfile ~ text
    key ~ text
  • AfterDecrypt
    Event raised after decrypting the file.
    component_event (1)
    inputfile ~ text
    outputfile ~ text
    key ~ text
  • OnEncryptFail
    Event raised after encrypting failed.
    component_event (4)
    error ~ text
    code ~ integer
  • OnDecryptFail
    Event raised after decrypting failed.
    component_event (3)
    error ~ text
    code ~ integer
Errors and Reasons

Formatted as Code - Error - Reason

  1. InvalidKeyException - If Key is not 16 char. length.
  2. NoSuchAlgorithmException - Will not throw this error.
  3. NoSuchPaddingException - Will not throw this error.
  4. IOException - File not exists, Wrong Decryption Password.

Methods/Functions

  • EncryptFile
    Encrypts input file and save it as encrypted file using the provided key.
    Calls OnEncryptFail if failed or AfterEncrypt if succeed.
    component_method
    inputfile ~ text (path)
    outputfile ~ text (path)
    key ~ text (used)
  • DecryptFile
    Decrypts input file and save it as decrypted file using the provided key.
    Calls OnDecryptFail if failed or AfterDecrypt if succeed.
    component_method (1)
    inputfile ~ text (path)
    outputfile ~ text (path)
    key ~ text (used)

4.Downloads

Aix file

Aia file

Test Apk file

5.Open Source

This extension is opensource and anyone can contribute to this extension.

6. Credits

I created this extension with the help of Rush. Without Rush, I could’ve not created this. Thanks to @Shreyash for Rush. Extension Documentation layout inspired from @vknow360.

12 Likes

Great :100:

1 Like

Thanks for reply. This is still in beta and It has some bugs/errors. You can contribute it by forking and making changes in Github.

1 Like

16 characters is 128Bit

1 Like

no java needed for the rush?

1 Like

No… It reduces the boiler plate code and easy to configure and build extension.
You can take a look at the repo for the project structure and configuration.

We can encrypt pdf, mp3 and video mp4

Yes, you can encrypt any file type.

When file name put and click on encrypt then show msg no such file.
What is the file path?
Please reply

Can you show me your blocks? So, I can see if there’s anything wrong with the path format.

Actually we try with your apk which are you given in this post.
Please tell me what file path?

1 Like

Please explain how we can choose file path?
I am trying to many time but not get any solution

1 Like

The path can be specified like either /storage/emulated/0/Downloads/sample.pdf or /Downloads/sample.pdf if UseAbsolutePath property is set to false.

I’ve been recently working on this extension and planning to move it out from the BETA stage. I just created a new test app to encrypt/decrypt files for testing. I’ll update the main post soon once I make it async ( currently freezes ui ) and the key issues. If you want to test it. Here you go.

Extension ( 1.2b ) : com.jaxparrow.filecrypto.filecryptography.aix (6.8 KB)

Test apk : File_Crypto.apk (5.5 MB)

I installed the app and found that no file is being encrypted, the output is from the blank, please rectify it, I need it very much thank you

1 Like

is there any size limit bcz i want to encrypt 2gb approx movies

It’s been a while since I’ve worked on it, and it’s still SYNC ( runs on a single thread and will freeze the UI ). That’s why I haven’t moved this from the beta phase ( haven’t got any time to work on this ), will patch things up soon.

and I don’t think this would be an efficient way to encrypt a 2GB file.

is there any way to encrypt a video to many parts with a .exo extension

I am waiting for new update