-2
Пожалуйста, помогите. Как сделать массив в шифровании и расшифровке?DES Шифрование и дешифрование в PHP
<?php
class DES{
function encrypt($plainText, $cipherKey){
//plainText
$result = $this->toBiner($plainText);
$result = $this->InitialPermutation($result);
//key
$key = $this->toBiner($cipherKey);
$key = $this->kompresBit($key);
$arrLeftShift = $this->LeftShift($key);
//final
$result = $this->keyExpansion($result, $arrLeftShift);
return $result;
}
function decrypt($encryptedText, $cipherKey){
$key = $this->toBiner($cipherKey);
$key = $this->kompresBit($key);
$arrLeftShift = $this->LeftShift($key);
$result = $this->reverseKeyExpansion($encryptedText, $arrLeftShift);
$result = $this->revInitialPermutation($result);
Что не так с вашим кодом? Это работает? Разве это не работает? Вы видите ошибки? Как я могу вам помочь? –