classes-Com-Tecnick-Pdf-Encrypt-Type-AESnopad

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

AESnopad

Com\Tecnick\Pdf\Encrypt\Type\AESnopad

AES no-padding

Tags
since
2011-05-23
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2015 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-pdf-encrypt

Table of Contents

BLOCKSIZE  = 16
Block size (IV length): openssl_cipher_iv_length('aes-256-cbc')
IVECT  = ""
Initialization Vector (16 bytes)
encrypt()  : string
Encrypt the data
pad()  : string
Pad the input string to the specified length (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0)

Constants

BLOCKSIZE

Block size (IV length): openssl_cipher_iv_length('aes-256-cbc')

public mixed BLOCKSIZE = 16

IVECT

Initialization Vector (16 bytes)

public mixed IVECT = ""

Methods

encrypt()

Encrypt the data

public encrypt(string $data, string $key[, string $ivect = self::IVECT ][, string $mode = 'aes-256-cbc' ]) : string
Parameters
$data : string

Data string to encrypt

$key : string

Encryption key

$ivect : string = self::IVECT

Initialization vector

$mode : string = 'aes-256-cbc'

Cipher

Return values
string

Encrypted data string.

pad()

Pad the input string to the specified length (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0)

protected pad(string $data, int $length) : string
Parameters
$data : string

Data to pad

$length : int

Padding length

Return values
string
 

© 2004-2021 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy