SBSDKAESEncrypter

@interface SBSDKAESEncrypter : NSObject <SBSDKStorageCrypting>

ScanbotSDKs default data encrypter. Provides AES128 and AES 256 encryption to your data.

Note: For maximum security the key that is used for encryption and decryption should contain 16 UTF8 characters for AES128 and 32 UTF8 characters for AES256. If possible don’t use alphanumeric characters exclusively. If the key is shorter than the recommended key phrase length it will be padded automatically. Longer keys will be truncated.

  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Not available.

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • Designated initializer. Creates a new AES encrypter/decrypter with either AES128 or AES256 encryption using the given key phrase.

    Declaration

    Objective-C

    - (nullable instancetype)initWithKey:(nonnull NSString *)key
                                    mode:(SBSDKAESEncrypterMode)mode;

    Swift

    init?(key: String, mode: SBSDKAESEncrypterMode)

    Parameters

    key

    the key phrase used to encrypt or decrypt the data. See notes in class info.

    Return Value

    The new encrypter object or nil if the encrypter could not be created due to an empty key.