写入命令后,我无法为 Ubuntu 16.04 的 netbeans 8.2 生成哈希:
ravi@Dell:~/Downloads$ sha256 netbeans-8.2-linux.sh
mlockall: Cannot allocate memory
Warning: couldn't lock memory, are you root?
Enter passphrase:
那么这个密码是什么?
我现在该怎么办?
答案1
我怀疑你应该执行sha256sum
计算校验和。
sha256sum netbeans-8.2-linux.sh
我还发现适用于 Linux Xubuntu 16.04 64/32 的 NetBeans 8.2 C / C ++其中指定:
和检查其 sha256(从终端:)
sha256sum path / filename
。
sha256
请参阅下文和之间的区别sha256sum
人sha256sum- 计算并检查 SHA256 消息摘要
人sha256- hashalot - 读取密码并打印哈希值
答案2
从man sha256
passphrase
只是用来产生散列的任何东西都可以。
DESCRIPTION
hashalot is a small tool that reads a passphrase from standard input, hashes it using the given hash type, and
prints the result to standard output.
Warning: If you do not use the -x option, the hash is printed in binary. This may wedge your terminal set‐
tings, or even force you to log out.
This is not a general purpose hasher, only the first line is used, not even including the final newline.
Thus, don't be surprised if the output seems to be different from other tools -- you'd have to hash exactly
the same string.
答案3
它从中进行哈希处理std in
,因此也许这会起作用:
cat netbeans-8.2-linux.sh |sha256
但是,您还有另一个问题,您必须设置内存分配,以消除mlockall
错误。