/** * Test if the decode method decodes correctly */ public function testDreamweaverDecode() { $src = '48627467364878686B745A6C7F80857E8275434C4C47578784817B5D8E7E948E64868E9785'; $this->assertEquals(\Redbox\Dreamweaver\Dreamweaver::decode_password($src), 'Hard2CrackPassword1982AplhaBravoDelta'); }
<?php require 'autoload.php'; use Redbox\Dreamweaver; $encoded_password = "******"; /** Should output. Your decoded password: SrX9v7sN */ echo "Your decoded password: " . Dreamweaver\Dreamweaver::decode_password($encoded_password) . PHP_EOL;
<?php require 'autoload.php'; use Redbox\Dreamweaver; $password = "******"; /** Should output. Your encoded password: 53735A3C7A3C7955 */ echo "Your encoded password: " . Dreamweaver\Dreamweaver::encode_password($password) . PHP_EOL;