AbstractAES

Abstract AES encryption class

abstract
since

4.0.0

package

Application

Methods

getZeroPadding

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

getZeroPadding(string string, int blockSize) : string

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

resizeKey

Trims or zero-pads a key / IV

resizeKey(string key, int size) : null|string

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