Mcrypt

Extends AbstractAES Implements AesInterface

Mcrypt implementation

deprecated
since

4.0.0

deprecated

4.3 will be removed in 6.0 Will be removed without replacement

package

Joomla CMS

Methods

decrypt

Decrypt encrypted data

decrypt( cipherText,  key) : 

Arguments

cipherText

stringEncrypted data

key

stringEncryptionkey

Response

stringPlaintext data

encrypt

Encrypt the data

encrypt( plainText,  key,  iv = null) : 

Arguments

plainText

stringPlaintext data

key

stringEncryption key

iv

stringIV for the encryption

Response

stringEncrypted data

getBlockSize

Get the block size

getBlockSize() : 

Response

int

getZeroPadding

Returns null bytes to append to the string so that it's zero padded to the specified block size

getZeroPadding( string,  blockSize) : 
inherited

Arguments

string

stringThe binary string which will be zero padded

blockSize

intThe block size

Response

stringThe zero bytes to append to the string to zero pad it to $blockSize

isSupported

Is this adapter supported?

isSupported() : 

Response

bool

resizeKey

Trims or zero-pads a key / IV

resizeKey( key,  size) : null|string
inherited

Arguments

key

stringThe key or IV to treat

size

intThe block size of the currently used algorithm

Response

null|stringNull if $key is null, treated string of $size byte length otherwise

setEncryptionMode

Set the encryption mode

setEncryptionMode( mode = 'cbc',  strength = 128) : 

Arguments

mode

stringEncryption Mode

strength

intEncryption Strength

Response

void

Properties

cipherType

Cypher Type

Type(s)

string

cipherMode

Cypher Mode

Type(s)

string