2020-07-31 15:03:53 +08:00
|
|
|
|
# ihash
|
2020-10-21 17:24:13 +08:00
|
|
|
|
命令行,全平台,支持通配符的hash校验工具
|
2020-07-31 15:12:38 +08:00
|
|
|
|
# 快速安装
|
2021-09-07 11:59:27 +08:00
|
|
|
|
go install github.com/xiaoqidun/ihash@latest
|
2020-07-31 15:12:38 +08:00
|
|
|
|
# 编译安装
|
|
|
|
|
```
|
|
|
|
|
git clone https://github.com/xiaoqidun/ihash.git
|
|
|
|
|
cd ihash
|
2021-09-07 11:59:27 +08:00
|
|
|
|
go build ihash.go
|
2020-07-31 15:24:22 +08:00
|
|
|
|
```
|
2020-07-31 16:36:59 +08:00
|
|
|
|
# 手动安装
|
2021-09-07 12:02:56 +08:00
|
|
|
|
1. 根据系统架构下载为你编译好的[二进制文件](https://aite.xyz/product/ihash/)
|
2020-07-31 16:36:59 +08:00
|
|
|
|
2. 将下载好的二进制文件重命名为ihash并保留后缀
|
|
|
|
|
3. 把ihash文件移动到系统PATH环境变量中的目录下
|
|
|
|
|
4. windows外的系统需使用chmod命令赋予可执行权限
|
2020-07-31 15:24:22 +08:00
|
|
|
|
# 校验类型
|
|
|
|
|
- md5sum
|
|
|
|
|
- sha1sum
|
|
|
|
|
- sha256sum
|
2021-09-07 13:50:47 +08:00
|
|
|
|
- sha384sum
|
2020-07-31 15:24:22 +08:00
|
|
|
|
- sha512sum
|
|
|
|
|
- sha3sum224
|
|
|
|
|
- sha3sum256
|
|
|
|
|
- sha3sum384
|
|
|
|
|
- sha3sum512
|
|
|
|
|
# 快捷命令
|
2020-07-31 15:59:46 +08:00
|
|
|
|
自行将./bin/替换成处于PATH环境变量中的目录路径
|
2020-07-31 15:24:22 +08:00
|
|
|
|
```
|
|
|
|
|
ihash -install ./bin/
|
|
|
|
|
```
|
|
|
|
|
# 字符校验
|
|
|
|
|
```
|
|
|
|
|
echo admin | md5sum
|
|
|
|
|
echo admin | ihash md5sum
|
|
|
|
|
```
|
|
|
|
|
# 文件校验
|
|
|
|
|
```
|
|
|
|
|
md5sum *
|
|
|
|
|
ihash md5sum *
|
|
|
|
|
```
|
|
|
|
|
# 传参说明
|
|
|
|
|
```
|
|
|
|
|
快捷命令 文件1 文件2 文件3 ...
|
|
|
|
|
原始程序 校验类型 文件1 文件2 文件3 ...
|
|
|
|
|
不传任何文件时从stdin(命令行)读取字符
|
2020-10-21 17:21:13 +08:00
|
|
|
|
```
|