Comments (9)
Swift implementation, also has decryption function: https://github.com/btnguyen2k/swift-rsautils
from objective-c-rsa.
@btnguyen2k Can you add Objective-C version descryption function to this project?
from objective-c-rsa.
@ideawu I have created a pull request for decryption function.
from objective-c-rsa.
how to decryption private key ?
from objective-c-rsa.
@coskungun, private key is a bit more complicated than I thought.
I have add function to decrypt with private key in my Swift version: https://github.com/btnguyen2k/swift-rsautils
Still, encryption with private key has not worked yet.
I will be investigating this a few more days and will update the ObjC code latter.
from objective-c-rsa.
Thanks to @btnguyen2k , we have more functions now:
+ (NSString *)decryptString:(NSString *)str publicKey:(NSString *)pubKey;
+ (NSData *)decryptData:(NSData *)data publicKey:(NSString *)pubKey;
+ (NSString *)decryptString:(NSString *)str privateKey:(NSString *)privKey;
+ (NSData *)decryptData:(NSData *)data privateKey:(NSString *)privKey;
from objective-c-rsa.
@btnguyen2k thank you very much. =)
from objective-c-rsa.
@ideawu : I want to do testing but when I try to decrypt using private_key it return nil.
specifically on the method :
+ (NSData *)stripPrivateKeyHeader:(NSData *)d_key
the data is there (610 bytes long) but it returns nil
after being stripped.
from objective-c-rsa.
ios9 真机调试下,RSA加密会随机失败,怎么解决,static public func encryptWithRSAPublicKey(data: NSData, pubkeyBase64: String, keychainTag: String) -> NSData? 方法随机返回 nil
from objective-c-rsa.
Related Issues (20)
- BEGIN RSA PUBLIC KEY
- 请问什么时候能支持私钥加密公钥解密啊?
- project returnung null values HOT 3
- 使用公钥加密后 java后台不能解密 HOT 2
- Can not decrypt HOT 3
- SecItemAdd status -34018 HOT 3
- Android sample HOT 3
- 请问有C#服务器的解密算法么? HOT 1
- RSA 加密线上失败,调试无法重现 HOT 7
- Can not decrypt with PKCS#1. HOT 1
- 应用在锁屏的时候解密失败,返回nil HOT 2
- RSA return -25308 errSecInteractionNotAllowed
- 并发时,SecItemCopyMatching方法会返回errSecItemNotFound HOT 5
- 在swift上加密后台不能解密 HOT 1
- 严重的bug HOT 1
- js怎么通过公钥解密?
- 并发的加解密会导致失败 HOT 1
- 这个库有两个严重的问题,使用前必看!!!
- 吴祖洋什么时候可以出来澄清,说下懒投资状态呢
- 请问 为什么解密时需要 把公钥存储到keychain? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objective-c-rsa.