shyandsy / cipher2 Goto Github PK
View Code? Open in Web Editor NEWa flutter plugin for AES encryption and decryption
License: GNU General Public License v3.0
a flutter plugin for AES encryption and decryption
License: GNU General Public License v3.0
import CryptoSwift
报错提示Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':cipher2' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
如题
谢谢~~~
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET CryptoSwift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:19:5: error: unexpected platform condition (expected 'os', 'arch', or 'swift')
#if canImport(Darwin)
^
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:22:8: error: no such module 'Glibc'
import Glibc
^
=== BUILD TARGET CryptoSwift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:19:5: error: unexpected platform condition (expected 'os', 'arch', or 'swift')
#if canImport(Darwin)
^
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:22:8: error: no such module 'Glibc'
import Glibc
^
=== BUILD TARGET CryptoSwift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:19:5: error: unexpected platform condition (expected 'os', 'arch', or 'swift')
#if canImport(Darwin)
^
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:22:8: error: no such module 'Glibc'
import Glibc
^
=== BUILD TARGET CryptoSwift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:19:5: error: unexpected platform condition (expected 'os', 'arch', or 'swift')
#if canImport(Darwin)
^
/Users/ye/Downloads/cipher2-master/example/ios/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift:22:8: error: no such module 'Glibc'
import Glibc
^
Could not build the application for the simulator.
Error launching application on iPhone X.
Exited (sigterm)
您好,这个插件很好,有对应 java AES/CBC/NoPadding 的吗?
rt
另外问下
gcm目前是否支持cpu硬件加速
ios一直报错
我使用了你所提供的 cipher2 0.2.1這個 flutter plugin , 非常簡易好用!!
目前我需要 AES-CCM 及 AES-GCM 來做加密解密,
想請問一下, 你能夠提供並升級此插件嗎?
ASE256加密算法
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
The following dependencies do not satisfy the required version:
project ':cipher2' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
[✓] Flutter (Channel beta, v1.1.8, on Linux, locale es_CO.utf8)
• Flutter version 1.1.8 at /home/aztrock/Descargas/android-studio/flutter
• Framework revision 985ccb6d14 (hace 3 semanas), 2019-01-08 13:45:55 -0800
• Engine revision 7112b72cc2
• Dart version 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/aztrock/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /home/aztrock/Descargas/android-studio/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.3)
• Android Studio at /home/aztrock/Descargas/android-studio/android-studio
• Flutter plugin version 32.0.1
• Dart plugin version 182.5124
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] Connected device (1 available)
• ASUS Z00TD • G1AZCY11N547 • android-arm64 • Android 5.0.2 (API 21)
• No issues found!
Process finished with exit code 0
cipher2
does not specify a Swift version and none of the targetsRunner
) integrating it have the SWIFT_VERSION
attribute set. PleaseSWIFT_VERSION
attribute in at least one ofOn iOS, the decrypted returned string is the iOS version of the iPhone. Like iOS 10.3.3
Works fine on Android.
It seems that the plugin is based on swift 2.0. Might be the problem. Could you please update the plugin to be Swift 4.2 compatible? Thanks
flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method Encrypt_AesCbc128Padding7 on channel cipher2)
#0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:300:7)
#1 Cipher2.encryptAesCbc128Padding7 (package:cipher2/cipher2.dart:14:20)
您好,我在项目中添加cipher2依赖,运行到ios中会出现错误,错误如下:
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET cipher2 OF PROJECT Pods WITH CONFIGURATION Debug ===
/Volumes/d/flutter/.pub-cache/hosted/pub.flutter-io.cn/cipher2-0.3.5/ios/Classes/Cipher2Plugin.m:2:9: fatal error: 'cipher2/cipher2-Swift.h' file not found
#import <cipher2/cipher2-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone XR.
我从githup直接下载您的example又可以正常运行,我通过绝对路径的方式添加cipher2依赖也不能解决问题。
但是在安卓中运行又是正确的。
实在不知道是什么原因导致的!如您知道解决方式,烦请告知,谢谢!
您好,首先多谢开源项目。希望对应AES/CBC/PKCS5Padding模式,希望模式做一个Enum。
另外向量iv能不能通过key自己生成,就不用传了
感谢你提供这个package!
请问可否增加支援AES 256 CBC PKCS7的呢? 谢谢!
AES CBC mode 128bit pkcs padding 7加密方法中,iv是可以为null的,但是在这个插件中不能为null,是我没找到还是怎么回事?
在xcode10.2上编译,报错如下信息:
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running Xcode build...
Xcode build done. 9.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET fluttertoast OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/macos/.pub-cache/hosted/pub.flutter-io.cn/cipher2-0.3.5/ios/Classes/SwiftCipher2Plugin.swift:3:8: error: no such module 'CryptoSwift'
import CryptoSwift
^
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
系统环境信息:
Xcode版本:10.2
Flutter版本:1.5.4
ERROR: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':cipher2' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
在最新版本的gradle中不支持低版本的kotlin
WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
用到了过时的API,高版本的Android版本中不再适用
希望快快更新啊啊啊啊啊啊
希望可以添加加密byte array的API在Flutter端
公司项目用到des3 加密,但是对加密算法一头雾水, 想部分界面用flutter来代替,但是实现不了
希望支持aes-128-ctr
你好?请问你这有AES 的ECB加密模式吗
使用插件在as上运行之后报错E/flutter (29081): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/Base64;
E/flutter (29081): at com.shyandsy.cipher2.Cipher2Plugin.Encrypt_AesCbc128Padding7(Cipher2Plugin.kt:92)
请问是什么问题
Unable to resolve this problem until now, please what other things can you suggest that I do
需要可以順利在 Flutter, PHP, cryptoJS 之間加解密。
謝謝
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.