GithubHelp home page GithubHelp logo

Comments (5)

navneet83 avatar navneet83 commented on August 24, 2024

What is the expected Decrypted data ? This looks like duplicate of this issue - #10 (comment)

Make sure your IV is 16 characters and consider randomizing your IV.

from cross-platform-aes-encryption.

manishmundra3 avatar manishmundra3 commented on August 24, 2024

Hello Navneet,
My encrypted string is :
97Dfy+pLJFA+RqYR8nX8YFr6JuVC5UUOQceV93kN4aUU+qUvjMa+2Z1iifcrG/U6

Actual string is :

This is test Encryption String One

string iv = "VFSGlobalApp";

string key = CryptLib.getHashSha256("VFSGlobalApp", 31); //32 bytes = 256
bits

Then i decrypt this encrypted text then i get nothing.

Thanks & Regards,
Manish Mundra

On Tue, Jun 16, 2015 at 11:40 PM, Navneet Kumar [email protected]
wrote:

What is the expected Decrypted data ? This looks like duplicate of this
issue - #10 (comment)
#10 (comment)

Make sure your IV is 16 characters and consider randomizing your IV.


Reply to this email directly or view it on GitHub
#15 (comment)
.

from cross-platform-aes-encryption.

navneet83 avatar navneet83 commented on August 24, 2024

Did you read my previous comment and implement changes accordingly ?

from cross-platform-aes-encryption.

manishmundra3 avatar manishmundra3 commented on August 24, 2024

Yes, i did but response is not according my encrypted string.

NSString *iv = @"GlobalApp";

NSString *key = [[CryptLib alloc]sha256:@"GlobalApp"

length:32];//getHashSha256(@"GlobalApp", 31); //32 bytes

NSString * secret = @"This is test Encryption String Two";
  • Output : *

r+jolqNoBBq/XCV9rrXzQwmFt8jCD/AHYdzIG/ECVUAVFsAIaYOQy+xzYrq8/Ayx

NSData * encryptedData = [[CryptLib alloc] encrypt:[secret

dataUsingEncoding:NSUTF8StringEncoding] key:key iv:iv];

NSString *encryptedText = [encryptedData

base64EncodingWithLineLength:0];

NSData * decryptedData = [[CryptLib alloc] decrypt:[encryptedText

dataUsingEncoding:NSUTF8StringEncoding] key:key iv:iv];

NSString * decryptedText = [decryptedData

base64EncodingWithLineLength:0];

*Output : *

Mk8OOh3yQ3KyddqzQ/xjReakOoUMcXBGXmZT0ZzUNrGNgRF/rwFkGZBup3j0k5LT5Cw3x+9201F89ri3l610qg==

Thanks & Regards,
Manish Mundra

On Wed, Jun 17, 2015 at 9:56 AM, Navneet Kumar [email protected]
wrote:

Did you read my previous comment and implement changes accordingly ?


Reply to this email directly or view it on GitHub
#15 (comment)
.

from cross-platform-aes-encryption.

navneet83 avatar navneet83 commented on August 24, 2024

What is your IV ? In your code you have used - NSString *iv = @"GlobalApp"; This has just 9 characters while I had mentioned that you'll need at least 16 characters.

from cross-platform-aes-encryption.

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.