RUI3 (RAK Unified Interface 3) - RAK4631
bg77::qsslcrypt

Public Member Functions

String set (String, String, int, int, String)
 
String set (String, String)
 

Member Function Documentation

◆ set() [1/2]

String set ( String  ,
String  ,
int  ,
int  ,
String   
)
Description
This api encrypts/decrypts data with a specified algorithm.
Syntax
bg77.qsslcrypt.set(algo,input_data,format,mode,key)
Parameters
algoString String type
  • "AES"
  • "MD5"
input_dataString
  • In AES-128-CBC mode: The data to be encrypted or decrypted. The data format is specified by <format>. The maximum length of <input_data> is 256 bytes. The length of data to be encrypted/decrypted with AES-128-CBC should be a multiple of 16 bytes.
  • In MD5 mode: String type. The data to be encrypted. The maximum length of <input_data> is 256 bytes.
    Parameters
    formatint Integer type. The format of input data.
    • 0 String format
    • 1 Hex format
    modeint Integer type. AES-128-CBC mode.
    • 0 AES-128-CBC decryption
    • 1 AES-128-CBC encryption
    keyString String type. The encryption/decryption key of AES-128-CBC. The length must be 16 bytes.
    Returns
    String response

◆ set() [2/2]

String set ( String  ,
String   
)
Description
This api encrypts/decrypts data with a specified algorithm.
Syntax
bg77.qsslcrypt.set(algo,input_data)
Parameters
algoString String type
  • "AES"
  • "MD5"
input_dataString
  • In AES-128-CBC mode: The data to be encrypted or decrypted. The data format is specified by <format>. The maximum length of <input_data> is 256 bytes. The length of data to be encrypted/decrypted with AES-128-CBC should be a multiple of 16 bytes.
  • In MD5 mode: String type. The data to be encrypted. The maximum length of <input_data> is 256 bytes.
    Returns
    String response