iPhone - AES256加密使用内置库 [英] iPhone - AES256 Encryption Using Built In Library
问题描述
@implementation
// pastie code
@end
@implementation
//我的类代码
@end
在我的类代码中,我创建一个NSMutableData并尝试调用EncryptAES方法,我收到一个警告,说它可能不会响应。我在这里做错了什么?我需要在其他地方实现pastie代码吗?感谢任何帮助。
这只是 @implementation
块。您还需要定义类别。将它放在你的头文件中:
@interface NSMutableData(AES)
- (NSMutableData *)EncryptAES:(NSString *)键;
- (NSMutableData *)DecryptAES :( NSString *)key
andForData:(NSMutableData *)objEncryptedData;
@end
Hey all, I am using http://pastie.org/966473 as a reference as all I need to do is encrypt something using AES256 encrypting. I created a class and put the implementation in the pastie on top of the implementation for my class.
@implementation
//pastie code
@end
@implementation
//my class code
@end
In my class code I create a NSMutableData and try to call the EncryptAES method and I get a warning saying it might not respond to that. What am I doing wrong here? do I need to implement the pastie code elsewhere? Thanks for any help.
That's just the @implementation
block. You also need to define the category. Put this in your header file:
@interface NSMutableData (AES)
- (NSMutableData*)EncryptAES:(NSString *)key;
- (NSMutableData*)DecryptAES:(NSString *)key
andForData:(NSMutableData*)objEncryptedData;
@end
这篇关于iPhone - AES256加密使用内置库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!