Platforms to show: All Mac Windows Linux Cross-Platform

Back to OldAESMBS class.

OldAESMBS.Decrypt(idata as memoryblock, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Decryptes the first 16 bytes in the input memoryblock at the given offset and stores the result in the output memoryblock at the given offset.
Notes:
If odata is nil, idata is used for output.
This is ECB mode.
OldAESMBS.DecryptCBC(idata as memoryblock, LengthBytes as Integer, IVector as memoryblock=nil, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Decryptes the 16 byte data blocks within LengthBytes bytes in the data.
Notes:
If odata is nil, idata is used for output.
If IVector is nil, a vector filled with zeros is used.
OldAESMBS.DecryptCFB(idata as memoryblock, LengthBytes as Integer, byref IVectorOffset as Integer, IVector as memoryblock=nil, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Decryptes the data in CFB128 mode.
Notes:
If odata is nil, idata is used for output.
If IVector is nil, a vector filled with zeros is used.
IVectorOffset safes the position in the IVector for the next call to this method.
iOffset: offset in idata.
oOffset: offset in odata.
LengthBytes: Length of data in idata and odata.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.DecryptCFBOld(idata as memoryblock, LengthBytes as Integer, byref IVectorOffset as Integer, IVector as memoryblock=nil, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Decryptes the data in CFB128 mode.
Notes:
If odata is nil, idata is used for output.
If IVector is nil, a vector filled with zeros is used.
IVectorOffset safes the position in the IVector for the next call to this method.
iOffset: offset in idata.
oOffset: offset in odata.
LengthBytes: Length of data in idata and odata.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.#
OldAESMBS.DecryptString(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Decrypts a string in CFB128 mode.
Example:
dim x,u,s as string
dim iv as MemoryBlock

s="Hello World"

// encrypt
s=ConvertEncoding(s,encodings.UTF8)

dim a as new OldAESMBS

call a.SetKey("1234567890123456")

iv=NewMemoryBlock(16)
x=a.EncryptString(s,iv)

MsgBox x

// decrypt

iv=NewMemoryBlock(16)
u=a.DecryptString(x,iv)

u=DefineEncoding(u,encodings.UTF8)

MsgBox u
Notes:
If IVector is nil, a vector filled with zeros is used.
The bytes from the string are read without checking the text encoding and the result string has no text encoding assigned.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.DecryptStringOld(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Decrypts a string in CFB128 mode.
Example:
dim x,u,s as string
dim iv as MemoryBlock

s="Hello World"

// encrypt
s=ConvertEncoding(s,encodings.UTF8)

dim a as new OldAESMBS

call a.SetKey("1234567890123456")

iv=NewMemoryBlock(16)
x=a.EncryptString(s,iv)

MsgBox x

// decrypt

iv=NewMemoryBlock(16)
u=a.DecryptString(x,iv)

u=DefineEncoding(u,encodings.UTF8)

MsgBox u
Notes:
If IVector is nil, a vector filled with zeros is used.
The bytes from the string are read without checking the text encoding and the result string has no text encoding assigned.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.Encrypt(idata as memoryblock, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Encryptes the first 16 bytes in the input memoryblock at the given offset and stores the result in the output memoryblock at the given offset.
Notes:
If odata is nil, idata is used for output.
This is ECB mode.
OldAESMBS.EncryptCBC(idata as memoryblock, LengthBytes as Integer, IVector as memoryblock=nil, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Encryptes the 16 byte data blocks within LengthBytes bytes in the data.
Notes:
If odata is nil, idata is used for output.
If IVector is nil, a vector filled with zeros is used.
OldAESMBS.EncryptCFB(idata as memoryblock, LengthBytes as Integer, byref IVectorOffset as Integer, IVector as memoryblock=nil, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Encryptes the data in CFB128 mode.
Notes:
If odata is nil, idata is used for output.
If IVector is nil, a vector filled with zeros is used.
IVectorOffset safes the position in the IVector for the next call to this method.
iOffset: offset in idata.
oOffset: offset in odata.
LengthBytes: Length of data in idata and odata.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.EncryptCFBOld(idata as memoryblock, LengthBytes as Integer, byref IVectorOffset as Integer, IVector as memoryblock=nil, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Encryptes the data in CFB128 mode.
Notes:
If odata is nil, idata is used for output.
If IVector is nil, a vector filled with zeros is used.
IVectorOffset safes the position in the IVector for the next call to this method.
iOffset: offset in idata.
oOffset: offset in odata.
LengthBytes: Length of data in idata and odata.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.EncryptString(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Encrypts a string in CFB128 mode.
Example:
dim x,u,s as string
dim iv as MemoryBlock

s="Hello World"

// encrypt
s=ConvertEncoding(s,encodings.UTF8)

dim a as new OldAESMBS

call a.SetKey("1234567890123456")

iv=NewMemoryBlock(16)
x=a.EncryptString(s,iv)

MsgBox x

// decrypt

iv=NewMemoryBlock(16)
u=a.DecryptString(x,iv)

u=DefineEncoding(u,encodings.UTF8)

MsgBox u
Notes:
If IVector is nil, a vector filled with zeros is used.
The bytes from the string are read without checking the text encoding and the result string has no text encoding assigned.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.EncryptStringOld(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Encrypts a string in CFB128 mode.
Example:
dim x,u,s as string
dim iv as MemoryBlock

s="Hello World"

// encrypt
s=ConvertEncoding(s,encodings.UTF8)

dim a as new OldAESMBS

call a.SetKey("1234567890123456")

iv=NewMemoryBlock(16)
x=a.EncryptString(s,iv)

MsgBox x

// decrypt

iv=NewMemoryBlock(16)
u=a.DecryptString(x,iv)

u=DefineEncoding(u,encodings.UTF8)

MsgBox u
Notes:
If IVector is nil, a vector filled with zeros is used.
The bytes from the string are read without checking the text encoding and the result string has no text encoding assigned.

The old code until plugin version 9.4 had a bug in the CFB method. This was fixed for 9.5. But the old behavior is still accessible using the methods with the Old suffix.
OldAESMBS.SetKey(key as memoryblock, nBits as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Sets the key.
Notes:
possible values for the bitcount:
128key is 16 bytes long
192key is 24 bytes long
256key is 32 bytes long

See also:

OldAESMBS.SetKey(key as string) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Sets the key.
Example:
dim x,u,s as string
dim iv as MemoryBlock

s="Hello World"

// encrypt
s=ConvertEncoding(s,encodings.UTF8)

dim a as new OldAESMBS

call a.SetKey("1234567890123456")

iv=NewMemoryBlock(16)
x=a.EncryptString(s,iv)

MsgBox x

// decrypt

iv=NewMemoryBlock(16)
u=a.DecryptString(x,iv)

u=DefineEncoding(u,encodings.UTF8)

MsgBox u
Notes:
Please make sure the key has right text encoding to avoid unexpected results.
Please use 16, 24 or 32 byte long key strings.

See also:

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


💬 Ask a question or report a problem
The biggest plugin in space...