@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
@param: {BOOL} $b2fpreenc: Default is FALSE ; If set to TRUE will pre-encrypt data using BF enc (v2)
Encrypts a string using the Threefish CBC 1024bit (v3 only)
This is intended to be used for high-sensitive persistent data (ex: data storage)
Ciphers: threefish.cbc (internal)
@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
@param: {BOOL} $fallback2fb: Default is FALSE ; If TRUE will try to fallback on TF / TF+BF / BF decrypt if signature is not recognized
Decrypts a string using the Threefish CBC 1024bit (v3 only)
This is intended to be used for high-sensitive persistent data (ex: data storage)
Ciphers: threefish.cbc (internal)
@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
@param: {BOOL} $bfpreenc: Default is FALSE ; If set to TRUE will pre-encrypt data using BF enc (v3)
Encrypts a string using the Twofish CBC 256bit (v3 only)
This is intended to be used for high-sensitive persistent data (ex: data storage)
Ciphers: twofish.cbc (internal)
@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
@param: {BOOL} $fallbackbf: Default is FALSE ; If TRUE will try to fallback on BF decrypt if signature is not recognized
Decrypts a string using the Twofish CBC 256bit (v3 only)
This is intended to be used for high-sensitive persistent data (ex: data storage)
Ciphers: twofish.cbc (internal)
@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
Encrypts a string using the Blowfish CBC 448bit (v3 only)
This is intended to be used for persistent data (ex: data storage)
Ciphers: blowfish.cbc (internal)
@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
Decrypts a string using the Blowfish CBC 448bit (v3 or v2 / v1 backward compatible)
This is intended to be used for persistent data (ex: data storage)
Ciphers: blowfish.cbc (internal)
@return: {STRING} The encrypted data as B64S or empty string on error
@param: {STRING} $data: The plain data to be encrypted
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
@param: {ENUM} $cipher: Selected cipher: hash/{mode}, blowfish.cbc, openssl/{cipher}/{mode} ; If no cipher is provided will use the default cipher
Encrypts data on-the-fly using various Ciphers
This is intended to be used for non-persistent data ; these ciphers may change or dissapear over time
@return: {STRING} The plain (decrypted) data or empty string on error
@param: {STRING} $data: The encrypted data
@param: {STRING} $key: The encryption key (secret) ; must be between 7 and 4096 bytes ; If no key is provided will use the internal key from init: SMART_FRAMEWORK_SECURITY_KEY
@param: {ENUM} $cipher: Selected cipher: hash/{mode}, blowfish.cbc, openssl/cipher/mode ; ; If no cipher is provided will use the default cipher
Decrypts data on-the-fly using various Ciphers
This is intended to be used for non-persistent data ; these ciphers may change or dissapear over time
Provides a built-in based feature to handle various encryption / decryption.