您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

c#-php代码转C#代码,来个会PHP和C#的高手

2024/3/30 5:52:26发布14次查看
phpc#
public static function oath_hotp($key, $counter){ $bin_counter = pack('n*', 0) . pack('n*', $counter); // counter must be 64-bit int $hash = hash_hmac ('sha1', $bin_counter, $key, true); return str_pad(self::oath_truncate($hash), self::otplength, '0', str_pad_left);}public static function oath_truncate($hash){ $offset = ord($hash[19]) & 0xf; return ( ((ord($hash[$offset+0]) & 0x7f)
self::otplength是类中的一个变量
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product