Giter VIP home page Giter VIP logo

Comments (23)

shyandsy avatar shyandsy commented on August 16, 2024

hi,

thanks for using my plugin.

unfortunately, there is no implementation for ios right now due to the fact i dont have Mac computer for the ios programming.

that will be done before Feb 10, is that ok for you?

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

Yes, that's fine. Please let me know if I can be of any assistance (I am using a Mac). I will gladly test your code as soon as possible. Mid-February is really a deadline for me. Thanks again for your quick reply.

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

en, there is no any MAC computer on my hand right now

i will try to borrow one and done that as soon as possible

just give me a star after i done that part, thanks😄

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

I will gladly report when it works on iOS and give you a BIG star!

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

Have you checked: https://github.com/krzyzanowskim/CryptoSwift
Please look at their AES example, it sounds like a swift call like the one that follows could be the answer. What do you think?
let decrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted)

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

@Peter-717

I created a macos system on vmware yesterday, and finished the ios support today.

it works now, just try it

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

Got it to work by doing the following:

  • Following the Installation steps explained within https://github.com/krzyzanowskim/CryptoSwift
  • Then editing Podfile an adding pod 'CryptoSwift' and running pod install on the terminal
  • Then back to Xcode and Run - Voila!
    Thank you so much again!

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

Just noticed that the App will crash if the decrypted provided string isn't of 24 characters exactly.

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

Actually a bit worse than that. If the decryption fails (for any reason), the App crashes silently (no error is thrown)

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

@Peter-717
the exmaple code in the plugin works good on my machine

could u give a sample input for crash?

for now, i haven't do input data validate in the plugin, and you have to check the input data before call the method. i will add the validation code later

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

@Peter-717
en, it should add CryptoSwift Library by itself

why u need to add CryptoSwift Library>?

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

Please try to run the following code:
class _MyHomePageState extends State {

String plainText = '我是shyandsy,never give up man';
String key = 'xxxxxxxxxxxxxxxx';
String iv = 'yyyyyyyyyyyyyyyy';

String encryptedString;

String decryptedString;

@OverRide
void initState() {
// TODO: implement initState
super.initState();
_encrypt();
}

Future _encrypt() async {
encryptedString = await Cipher2.encryptAesCbc128Padding7(plainText, key, iv);
print(encryptedString);
}

Future _decrypt() async {

decryptedString = await Cipher2.decryptAesCbc128Padding7(encryptedString, key, iv);

print(decryptedString);
encryptedString = 'Hello';

decryptedString = await Cipher2.decryptAesCbc128Padding7(encryptedString, key, iv);

print(decryptedString);

}

The App crashes as soon as it tries to decrypt the string 'Hello'.
Hope this helps. Thanks!

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

@Peter-717
the new version 0.2.0 published

the exception can be handled for both ios and android

https://pub.dartlang.org/packages/cipher2

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

from cipher2.

shyandsy avatar shyandsy commented on August 16, 2024

@Peter-717 any feedback?

from cipher2.

Peter-717 avatar Peter-717 commented on August 16, 2024

from cipher2.

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.