Questions tagged [jncryptor]

JNCryptor is a Java library that simplifies encrypting data with AES. The corresponding library for iOS is RNCryptor.

JNCryptor is a Java library that simplifies the process of encrypting data securely using AES.

JNCryptor is based on the RNCryptor library for iOS. Both libraries use a common output format, allowing sharing of encrypted data between Java (hence, Android) and iOS applications.

Implementations are available in other languages too, see the RNCryptor project page for more details.

13 questions
6
votes
1 answer

JNCryptor - RNCryptor Image file encryption / decryption

I am trying to get image encryption / decryption working using AES256 implementation of RNCryptor Library. This is my code so far : //Encrypt file /** * var encryptedData = RNCryptor.encrypt(data: data as Data, withPassword:…
Alok Omkar
  • 628
  • 1
  • 9
  • 18
3
votes
1 answer

Android encryption not working (PBKDF2WithHmacSHA256 encryption with AES/CBC/PKCS7Padding)

I am trying to write an encryption code using Cipher Algorithm "AES/CBC/PKCS7Padding", HMAC algorithm "HmacSHA256" and key derivation algorithm "PBKDF2WithHmacSHA256" with the help of android JNCryptor. But it shows: CryptorException: Failed to…
George Thomas
  • 4,566
  • 5
  • 30
  • 65
2
votes
2 answers

using RNCryptor on android

I have some image files that are encrypted with RNCryptor and I want to decrypt them and use them as a background of a Framelayout. I walk through sample files, but my application force closes after a while and didn't show any images. I…
Ali Abdolahi
  • 324
  • 3
  • 10
2
votes
0 answers

PKCS5Padding vs PKCS7Padding Compatability Android iOS

I am creating both an Android and iOS version of an app and have a piece of data that needs to be encrypted. I am using the JNCryptor/RNCryptor libraries for Android and iOS respectively because they are claimed to be compatible. However, when I…
user3794585
  • 203
  • 1
  • 11
1
vote
1 answer

JNCryptor not working, Cannot Resolve Symbol AES256JNCryptor

im using JNCryptor library, but i got error "Cannot Resolve Symbol AES256JNCryptor" JNCryptor cryptor = new AES256JNCryptor(); byte[] plaintext = "Hello, World!".getBytes(); String password = "secretsquirrel"; try { byte[]…
Borom1r
  • 155
  • 1
  • 7
  • 18
1
vote
2 answers

Why does JNCryptor/RNCryptor library throws a InvalidHMACException?

I want to use AES256 symmetric encryption my iPhone app and my Java server socket. I am currently using Rob Napier's RNCryptor/JNCryptor library. Encryption on the iPhone seems to work well, as I am able to decrypt the encrypted strings back again.…
salocinx
  • 3,715
  • 8
  • 61
  • 110
1
vote
1 answer

RNCryptor/JNCryptor - decrypt string in ios which is encrypted in android

Hellp All, I have used RNCryptor/JNCryptor for iOS and android following is the code for encrypt in Android and Decrypt in iOS. Encrypt code in Android public static String EncryptMessage(String message) { JNCryptor cryptor = new…
Satish
  • 1,012
  • 2
  • 15
  • 32
0
votes
1 answer

leaf name and type name can be same in yang

Below example is correct yang statement or not? it is valid by pyang but JNC is unable to process grouping TLId { leaf age { type Age; mandatory true; } } typedef Age { type string { pattern '[0-9][0-9]'; } } Please suggest
0
votes
1 answer

JNCryptor: Why does my call to decryptData not produce the correct result?

I need use the JNCryptor library in a project, so I am first trying to get a very simple example of encryption/decryption to work. My program just encrypts a short string, then decrypts it and displays the result. The problem is that I don't get…
Frank K.
  • 41
  • 1
0
votes
1 answer

JNCryptor on Android to RNCryptor-php

I have a file in my android app that I want to upload to the server. I am using JNCryptor for AES 256 encryption. I have the RNCryptor-php library on my server and I am trying to decrypt the file, but it is not getting decrypted correctly. Here is…
Help
  • 1
0
votes
0 answers

Decrypt AES256 encrypted file and save it in the phone

I'm downloading a file that is stored on a remote server, I try to decrypt it using JNCryptor, and all goes well except that the file I have downloaded and store in the phone external storage is corrupted and I cannot open it. Can anyone tell me…
Darko Petkovski
  • 3,892
  • 13
  • 53
  • 117
0
votes
1 answer

Convert byte[] to String Java Android Encryption

I am using the JNCryptor library to encrypt a string before sending it to my server as an encrypted string. Here is my code: String teststring = "Hello World"; JNCryptor cryptor = new AES256JNCryptor(); byte[] plaintext =…
user3794585
  • 203
  • 1
  • 11
0
votes
3 answers

How to encrypt an InputStream with JNCryptor

I'm developing an iPad app and using RNCryptor for the encryption and decryption on the device. There is a Java version of this encryption format available in the form of JNCryptor. I now have data to be read from an InputStream, but I want to…
Johanneke
  • 5,443
  • 4
  • 20
  • 33