EncryptionManager

@objc(SFMCSdkEncryptionManager)
public class EncryptionManager : NSObject

Encryption Manager class is used for creating a unique encryption key (AES 256 encryption) for modules.

  • Tag: EncryptionManager
  • Encrypts a String value using AES 256

    Declaration

    Swift

    @objc
    public func encrypt(string: String) -> Data?

    Parameters

    string

    String to be encrypted with unicode String encoding

    Return Value

    The encrypted String data. Returns nil if the data is unable to be encrypted

  • Decrypts data of a String and returns the String representation of the data

    Declaration

    Swift

    @objc
    public func decrypt(stringData: Data) -> String?

    Parameters

    stringData

    The AES 256 encrypted data representation of a String

    Return Value

    The String value associated with the encrypted data provided. Returns nil if the data is unable to be encrypted