NSString+BBAEncode.h
1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// NSString+BBAEnode.h
// BBAFoundation
//
// Created by Zhu,Yusong on 2018/9/20.
// Copyright © 2018年 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/*
* 字符串 加密相关扩展
* 详细介绍请看README-Encode
*/
@interface NSString (BBAEncode)
/**
* @brief Calculate the md5 hash of this string using CC_MD5.
*
* @return md5 hash of this string
*/
@property (nonatomic, readonly) NSString *bdp_md5Hash;
/**
* @brief Calculate the SHA1 hash of this string using CommonCrypto CC_SHA1.
*
* @return NSString with SHA1 hash of this string
*/
@property (nonatomic, readonly) NSString *bdp_sha1Hash;
#pragma mark - Deprecated Methods
/**
* @brief Calculate the md5 hash of this string using CC_MD5.
*
* @return md5 hash of this string
*/
@property (nonatomic, readonly) NSString *bba_md5Hash __deprecated_msg("use bdp_md5Hash instead");
/**
* @brief Calculate the SHA1 hash of this string using CommonCrypto CC_SHA1.
*
* @return NSString with SHA1 hash of this string
*/
@property (nonatomic, readonly) NSString *bba_sha1Hash __deprecated_msg("use bdp_sha1Hash instead");
@end
NS_ASSUME_NONNULL_END