Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

OldAESMBS.Decrypt(idata as memoryblock, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.4 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

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 Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.4 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

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 Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

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 Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.#

Feedback, Comments & Corrections

OldAESMBS.DecryptString(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

OldAESMBS.DecryptStringOld(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

OldAESMBS.Encrypt(idata as memoryblock, odata as memoryblock=nil, iOffset as Integer=0, oOffset as Integer=0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.4 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

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 Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.4 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

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 Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

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 Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

OldAESMBS.EncryptString(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

OldAESMBS.EncryptStringOld(idata as string, IVector as memoryblock=nil) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

OldAESMBS.SetKey(key as memoryblock, nBits as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 4.1 Yes Yes Yes Yes No
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:

Feedback, Comments & Corrections

OldAESMBS.SetKey(key as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Encryption and Hash MBS Encryption Plugin 9.4 Yes Yes Yes Yes No
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:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins