mirror of
https://github.com/Yubico/yubikey-ksm.git
synced 2025-03-23 18:19:51 +01:00
Renamed hex2bin to yubi_hex2bin.
This commit is contained in:
parent
e45bc5f088
commit
deb4070f4e
4
NEWS
4
NEWS
@ -1,5 +1,9 @@
|
||||
* Version 1.9 unreleased
|
||||
|
||||
* Renamed hex2bin to yubi_hex2bin.
|
||||
Issue #1 reported by Dain Nilsson, see:
|
||||
https://github.com/Yubico/yubikey-ksm/issues/1
|
||||
|
||||
* Version 1.8 released 2013-01-21
|
||||
|
||||
* Added ChangeLog to releases.
|
||||
|
@ -28,7 +28,7 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
function hex2bin($h)
|
||||
function yubi_hex2bin($h)
|
||||
{
|
||||
if (!is_string($h)) return null;
|
||||
$r='';
|
||||
@ -46,9 +46,9 @@ function modhex2hex($m)
|
||||
function aes128ecb_decrypt($key,$in)
|
||||
{
|
||||
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'ecb', '');
|
||||
$iv = hex2bin('00000000000000000000000000000000');
|
||||
mcrypt_generic_init($td, hex2bin($key), $iv);
|
||||
$result = bin2hex(mdecrypt_generic($td, hex2bin($in)));
|
||||
$iv = yubi_hex2bin('00000000000000000000000000000000');
|
||||
mcrypt_generic_init($td, yubi_hex2bin($key), $iv);
|
||||
$result = bin2hex(mdecrypt_generic($td, yubi_hex2bin($in)));
|
||||
mcrypt_generic_deinit($td);
|
||||
|
||||
return $result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user