faqts : Computers : Programming : Languages : PHP : Common Problems : Encryption

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 11 people (91%) answered Yes
Recently 5 of 6 people (83%) answered Yes

Entry

Why does mcrypt add NULLs to my string before encrypting it?

Jun 29th, 1999 23:41
Nathan Wallace, Sascha Schumann


Triple DES (and all other algorithms provided by mcrypt) are
block algorithms. That means that most of them work only on fixed
size blocks. Triple DES takes 64 bits per block. It simply cannot
work on fewer data, so it has to fill up the buffer.