mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-02 13:52:02 +00:00
Merge branch '3.0'
This commit is contained in:
commit
f39e797bb2
@ -3288,4 +3288,17 @@ abstract class SymmetricKey
|
|||||||
$mask = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF";
|
$mask = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF";
|
||||||
return strrev($r->toBytes()) & $mask;
|
return strrev($r->toBytes()) & $mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the mode
|
||||||
|
*
|
||||||
|
* You can do $obj instanceof AES or whatever to get the cipher but you can't do that to get the mode
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMode()
|
||||||
|
{
|
||||||
|
return array_flip(self::MODE_MAP)[$this->mode];
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user