ARTCrypto
Objective-C
@interface ARTCrypto : NSObject
Swift
class ARTCrypto : NSObject
Contains the properties required to configure the encryption of ARTMessage payloads.
-
Returns an
ARTCipherParamsobject, using the default values for any fields not supplied by thecipherParamsdictionary.Declaration
Objective-C
+ (nonnull ARTCipherParams *)getDefaultParams: (nonnull NSDictionary *)cipherParams;Swift
class func getDefaultParams(_ cipherParams: [AnyHashable : Any]) -> ARTCipherParamsParameters
cipherParamsAn
ARTCipherParams-like dictionary object.Return Value
An
ARTCipherParamsobject, using the default values for any fields not supplied. -
Generates a random key to be used in the encryption of the channel.
Declaration
Objective-C
+ (nonnull NSData *)generateRandomKey:(NSUInteger)length;Swift
class func generateRandomKey(_ length: UInt) -> DataParameters
lengthThe length of the key, in bits, to be generated.
Return Value
The key as a binary
NSData. -
Generates a random key to be used in the encryption of the channel. Here the default key length of the default algorithm is used: for
AESthis is 256 bits.Declaration
Objective-C
+ (nonnull NSData *)generateRandomKey;Swift
class func generateRandomKey() -> DataReturn Value
The key as a binary
NSData.