Platforms to show: All Mac Windows Linux Cross-Platform

CipherMBS.CipherInit(key as memoryblock, IV as memoryblock, Encrypt as boolean) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Initializes the cipher for encryption or decryption.
Notes:
We added for 17.3 a new boolean result:

Returns true in case of success and key length is okay.
Returns false in case of failures like out of memory, wrong key length.

Even if key length is wrong, we initialize (as with older versions before) but may crop the key length to default length.
AES 128 uses 16 byte key length, AES 256 uses 32 byte key length.
Key and IV are both filled with zeros to reach the minimum length.

key: The key to use.
IV: Optional, the initial vector.

You can use IVLength and KeyLength properties to learn how long those should be.

Feedback, Comments & Corrections

CipherMBS.Clear
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Clears the current state.

Feedback, Comments & Corrections

CipherMBS.Constructor
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: The private constructor.

Feedback, Comments & Corrections

CipherMBS.DecryptInit(key as memoryblock, IV as memoryblock = nil) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Initializes the cipher for decrypting.
Example:
dim key as string = "mysecretkey"
dim encrypted as string = "6IcB9bpDwOjjONErhYQ6c7+Fb4qszsUNZVU0iThLYqOu7chJ7MG2nwSpRBUY0ZC3"

encrypted = DecodeBase64(encrypted)

dim c as CipherMBS = CipherMBS.aes_128_cbc
call c.DecryptInit key

dim s as string = c.ProcessString(Encrypted)+c.FinalizeAsString

Break // "In welcher Stadt steht das Bundeshaus?" is now in s.
Notes:
We added for 17.3 a new boolean result:

Returns true in case of success and key length is okay.
Returns false in case of failures like out of memory, wrong key length.

Even if key length is wrong, we initialize (as with older versions before) but may crop the key length to default length.
AES 128 uses 16 byte key length, AES 256 uses 32 byte key length.
Key and IV are both filled with zeros to reach the minimum length.

key: The key to use.
IV: Optional, the initial vector.

You can use IVLength and KeyLength properties to learn how long those should be.

For AES the length of the key defines whether you get 128, 192 or 256 bit encryption. Pass some other key length will return an error. Best is usually to put a hashing algorithm before to make sure the key has the required bit length, e.g. use SHA256MBS class.

Feedback, Comments & Corrections

CipherMBS.EncryptInit(key as memoryblock, IV as memoryblock = nil) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Initializes the cipher for encrypting.
Example:
dim c as CipherMBS = CipherMBS.aes_128_cfb128
dim CKey as MemoryBlock = "1234567812345678"
dim CIV as MemoryBlock
dim data as string = "Hello World. Just a test!"

call c.EncryptInit Ckey, CIV

dim output as string = c.ProcessString(data)
output = output + c.FinalizeAsString

MsgBox EncodeHex(output)
Notes:
We added for 17.3 a new boolean result:

Returns true in case of success and key length is okay.
Returns false in case of failures like out of memory, wrong key length.

Even if key length is wrong, we initialize (as with older versions before) but may crop the key length to default length.
AES 128 uses 16 byte key length, AES 256 uses 32 byte key length.
Key and IV are both filled with zeros to reach the minimum length.

key: The key to use.
IV: Optional, the initial vector.

You can use IVLength and KeyLength properties to learn how long those should be.

For AES the length of the key defines whether you get 128, 192 or 256 bit encryption. Pass some other key length will return an error. Best is usually to put a hashing algorithm before to make sure the key has the required bit length, e.g. use SHA256MBS class.

Feedback, Comments & Corrections

CipherMBS.FinalizeAsMemory as memoryblock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Finalizes en/decryption and returns last data.

Feedback, Comments & Corrections

CipherMBS.FinalizeAsString as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Finalizes en/decryption and returns last data.
Example:
dim c as CipherMBS = CipherMBS.aes_128_cfb128
dim CKey as MemoryBlock = "1234567812345678"
dim CIV as MemoryBlock
dim data as string = "Hello World. Just a test!"

call c.EncryptInit Ckey, CIV

dim output as string = c.ProcessString(data)
output = output + c.FinalizeAsString

MsgBox EncodeHex(output)
Notes:
Returned string does not contain text, but binary data.
Please do not store in text fields in database without using EncodeHex or EncodeBase64 to make it a text string.

Feedback, Comments & Corrections

CipherMBS.ProcessFile(InputFile as FolderItem, OutputFile as FolderItem) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Processes content of file.
Notes:
Plugin will start a preemptive thread to read in file and process all data in chunks and write to output file.
Returns true on success or false on failure. May raise OutOfMemoryException or IOException.
This function works best if called from a thread.

Feedback, Comments & Corrections

CipherMBS.ProcessMemory(data as memoryblock) as MemoryBlock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Processes data in a memory block.
Notes: due to block sizes, the result may be longer or shorter than the input size.

Feedback, Comments & Corrections

CipherMBS.ProcessString(data as String) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Processes data in a string.
Example:
dim key as string = "mysecretkey"
dim encrypted as string = "6IcB9bpDwOjjONErhYQ6c7+Fb4qszsUNZVU0iThLYqOu7chJ7MG2nwSpRBUY0ZC3"

encrypted = DecodeBase64(encrypted)

dim c as CipherMBS = CipherMBS.aes_128_cbc
call c.DecryptInit key

dim s as string = c.ProcessString(Encrypted)+c.FinalizeAsString

Break // "In welcher Stadt steht das Bundeshaus?" is now in s.
Notes:
due to block sizes, the result may be longer or shorter than the input size.

Returned string does not contain text, but binary data.
Please do not store in text fields in database without using EncodeHex or EncodeBase64 to make it a text string.

Feedback, Comments & Corrections

CipherMBS.SetPadding(padding as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Enables padding.
Notes: On by default.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Encryption Plugin.

The biggest plugin in space...




Links
MBS FileMaker Plugins

Start Chat