```javascript
// JS Hashlib Lib :
https://github.com/LuoZijun/hashlib.js// 把 hashlib.js 引入你的 html 。
// <script type="text/javascript" src="hashlib.js"></script>
var target = 'E1f0813d4cea349c75b135043842608b123456781';
var str = '12345678';
var pid = '1';
var calg = '12345678';
var tmpchar = pid + str + calg;
var hash = new hashlib.md5(tmpchar).hexdigest();
var array = (hash + calg + pid).split('');
array.splice(0, 1, array[0].toUpperCase() );
var result = array.join('');
console.log( 'Target: ' + result + ' Result: ' + result );
console.log( target == result );
```