Inherits from NSObject
Declared in BFCryptor.h

Overview

This class adds some useful methods to encrypt/decrypt data. All methods are static

Tasks

Class Methods

AES128DecryptData:withKey:

+ (NSData *_Nullable)AES128DecryptData:(NSData *_Nonnull)data withKey:(NSString *_Nonnull)key
Discussion

Decrypt NSData in AES128

Parameters

data

NSData to be decrypted

key

Key to decrypt data

Return Value

Returns the decrypted NSData

Declared In

BFCryptor.h

AES128DecryptString:withKey:

+ (NSData *_Nullable)AES128DecryptString:(NSString *_Nonnull)string withKey:(NSString *_Nonnull)key
Discussion

Decrypt NSString in AES128

Parameters

key

Key to decrypt data

data

NSString to be decrypted

Return Value

Returns the decrypted NSData

Declared In

BFCryptor.h

AES128EncryptData:withKey:

+ (NSData *_Nullable)AES128EncryptData:(NSData *_Nonnull)data withKey:(NSString *_Nonnull)key
Discussion

Encrypt NSData in AES128

Parameters

data

NSData to be encrypted

key

Key to encrypt data

Return Value

Returns the encrypted NSData

Declared In

BFCryptor.h

AES128EncryptString:withKey:

+ (NSData *_Nullable)AES128EncryptString:(NSString *_Nonnull)string withKey:(NSString *_Nonnull)key
Discussion

Encrypt NSString in AES128

Parameters

key

Key to encrypt data

data

NSString to be encrypted

Return Value

Returns the encrypted NSData

Declared In

BFCryptor.h

AES256DecryptData:withKey:

+ (NSData *_Nullable)AES256DecryptData:(NSData *_Nonnull)data withKey:(NSString *_Nonnull)key
Discussion

Decrypt NSData in AES256

Parameters

data

NSData to be decrypted

key

Key to decrypt data

Return Value

Returns the decrypted NSData

Declared In

BFCryptor.h

AES256DecryptString:withKey:

+ (NSData *_Nullable)AES256DecryptString:(NSString *_Nonnull)string withKey:(NSString *_Nonnull)key
Discussion

Decrypt NSString in AES256

Parameters

key

Key to decrypt data

data

NSString to be decrypted

Return Value

Returns the decrypted NSData

Declared In

BFCryptor.h

AES256EncryptData:withKey:

+ (NSData *_Nullable)AES256EncryptData:(NSData *_Nonnull)data withKey:(NSString *_Nonnull)key
Discussion

Encrypt NSData in AES256

Parameters

data

NSData to be encrypted

key

Key to encrypt data

Return Value

Returns the encrypted NSData

Declared In

BFCryptor.h

AES256EncryptString:withKey:

+ (NSData *_Nullable)AES256EncryptString:(NSString *_Nonnull)string withKey:(NSString *_Nonnull)key
Discussion

Encrypt NSString in AES256

Parameters

key

Key to encrypt data

data

NSString to be encrypted

Return Value

Returns the encrypted NSData

Declared In

BFCryptor.h

MD5:

+ (NSString *_Nullable)MD5:(NSString *_Nonnull)string
Discussion

Create a MD5 string

Parameters

string

The string to be converted

Return Value

Returns the MD5 NSString

Declared In

BFCryptor.h

SHA1:

+ (NSString *_Nullable)SHA1:(NSString *_Nonnull)string
Discussion

Create a SHA1 string

Parameters

string

The string to be converted

Return Value

Returns the SHA1 NSString

Declared In

BFCryptor.h

SHA256:

+ (NSString *_Nullable)SHA256:(NSString *_Nonnull)string
Discussion

Create a SHA256 string

Parameters

string

The string to be converted

Return Value

Returns the SHA256 NSString

Declared In

BFCryptor.h

SHA512:

+ (NSString *_Nullable)SHA512:(NSString *_Nonnull)string
Discussion

Create a SHA512 string

Parameters

string

The string to be converted

Return Value

Returns the SHA512 NSString

Declared In

BFCryptor.h