NSData(FWApplication)
@interface NSData (FWApplication)
#pragma mark - Encrypt
/// 利用AES加密数据
- (nullable NSData *)fw_AESEncryptWithKey:(NSString *)key andIV:(NSData *)iv NS_REFINED_FOR_SWIFT;
/// 利用AES解密数据
- (nullable NSData *)fw_AESDecryptWithKey:(NSString *)key andIV:(NSData *)iv NS_REFINED_FOR_SWIFT;
/// 利用3DES加密数据
- (nullable NSData *)fw_DES3EncryptWithKey:(NSString *)key andIV:(NSData *)iv NS_REFINED_FOR_SWIFT;
/// 利用3DES解密数据
- (nullable NSData *)fw_DES3DecryptWithKey:(NSString *)key andIV:(NSData *)iv NS_REFINED_FOR_SWIFT;
#pragma mark - RSA
/// RSA公钥加密,数据传输安全,使用默认标签,执行base64编码
- (nullable NSData *)fw_RSAEncryptWithPublicKey:(NSString *)publicKey NS_REFINED_FOR_SWIFT;
/// RSA公钥加密,数据传输安全,可自定义标签,指定base64编码
- (nullable NSData *)fw_RSAEncryptWithPublicKey:(NSString *)publicKey andTag:(NSString *)tagName base64Encode:(BOOL)base64Encode NS_REFINED_FOR_SWIFT;
/// RSA私钥解密,数据传输安全,使用默认标签,执行base64解密
- (nullable NSData *)fw_RSADecryptWithPrivateKey:(NSString *)privateKey NS_REFINED_FOR_SWIFT;
/// RSA私钥解密,数据传输安全,可自定义标签,指定base64解码
- (nullable NSData *)fw_RSADecryptWithPrivateKey:(NSString *)privateKey andTag:(NSString *)tagName base64Decode:(BOOL)base64Decode NS_REFINED_FOR_SWIFT;
/// RSA私钥加签,防篡改防否认,使用默认标签,执行base64编码
- (nullable NSData *)fw_RSASignWithPrivateKey:(NSString *)privateKey NS_REFINED_FOR_SWIFT;
/// RSA私钥加签,防篡改防否认,可自定义标签,指定base64编码
- (nullable NSData *)fw_RSASignWithPrivateKey:(NSString *)privateKey andTag:(NSString *)tagName base64Encode:(BOOL)base64Encode NS_REFINED_FOR_SWIFT;
/// RSA公钥验签,防篡改防否认,使用默认标签,执行base64解密
- (nullable NSData *)fw_RSAVerifyWithPublicKey:(NSString *)publicKey NS_REFINED_FOR_SWIFT;
/// RSA公钥验签,防篡改防否认,可自定义标签,指定base64解码
- (nullable NSData *)fw_RSAVerifyWithPublicKey:(NSString *)publicKey andTag:(NSString *)tagName base64Decode:(BOOL)base64Decode NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
利用AES加密数据
Declaration
Objective-C
- (nullable NSData *)fw_AESEncryptWithKey:(nonnull NSString *)key andIV:(nonnull NSData *)iv;
-
利用AES解密数据
Declaration
Objective-C
- (nullable NSData *)fw_AESDecryptWithKey:(nonnull NSString *)key andIV:(nonnull NSData *)iv;
-
利用3DES加密数据
Declaration
Objective-C
- (nullable NSData *)fw_DES3EncryptWithKey:(nonnull NSString *)key andIV:(nonnull NSData *)iv;
-
利用3DES解密数据
Declaration
Objective-C
- (nullable NSData *)fw_DES3DecryptWithKey:(nonnull NSString *)key andIV:(nonnull NSData *)iv;
-
RSA公钥加密,数据传输安全,使用默认标签,执行base64编码
Declaration
Objective-C
- (nullable NSData *)fw_RSAEncryptWithPublicKey:(nonnull NSString *)publicKey;
-
RSA公钥加密,数据传输安全,可自定义标签,指定base64编码
Declaration
Objective-C
- (nullable NSData *)fw_RSAEncryptWithPublicKey:(nonnull NSString *)publicKey andTag:(nonnull NSString *)tagName base64Encode:(BOOL)base64Encode;
-
RSA私钥解密,数据传输安全,使用默认标签,执行base64解密
Declaration
Objective-C
- (nullable NSData *)fw_RSADecryptWithPrivateKey:(nonnull NSString *)privateKey;
-
RSA私钥解密,数据传输安全,可自定义标签,指定base64解码
Declaration
Objective-C
- (nullable NSData *)fw_RSADecryptWithPrivateKey:(nonnull NSString *)privateKey andTag:(nonnull NSString *)tagName base64Decode:(BOOL)base64Decode;
-
RSA私钥加签,防篡改防否认,使用默认标签,执行base64编码
Declaration
Objective-C
- (nullable NSData *)fw_RSASignWithPrivateKey:(nonnull NSString *)privateKey;
-
RSA私钥加签,防篡改防否认,可自定义标签,指定base64编码
Declaration
Objective-C
- (nullable NSData *)fw_RSASignWithPrivateKey:(nonnull NSString *)privateKey andTag:(nonnull NSString *)tagName base64Encode:(BOOL)base64Encode;
-
RSA公钥验签,防篡改防否认,使用默认标签,执行base64解密
Declaration
Objective-C
- (nullable NSData *)fw_RSAVerifyWithPublicKey:(nonnull NSString *)publicKey;
-
RSA公钥验签,防篡改防否认,可自定义标签,指定base64解码
Declaration
Objective-C
- (nullable NSData *)fw_RSAVerifyWithPublicKey:(nonnull NSString *)publicKey andTag:(nonnull NSString *)tagName base64Decode:(BOOL)base64Decode;