如何计算REBOL 3模块校验和?

时间:2009-10-08 05:02:38

标签: checksum rebol

REBOL 3中可以计算SHA1模块校验和。当REBOL加载模块时,它会将其校验和与加载模块的校验和进行比较,如果两者不匹配,则会生成错误,即。 access error: invalid checksum (tampered file)

无论我如何尝试,我似乎无法创建REBOL 3喜欢的模块校验和。当我查看import的文档时,其/check细化说明使用了checksum/secure的{​​{1}}。我已经尝试过各种各样的变种而没有运气:

import/check %module.r checksum/secure to-binary mold/flat load/all %module.r
import/check %module.r checksum/secure to-binary mold/flat load %module.r
import/check %module.r checksum/secure to-binary mold/only/flat load/all %module.r
import/check %module.r checksum/secure to-binary mold/only/flat load %module.r
import/check %module.r checksum/secure read %module.r

等等。它都不起作用。我必须做一些简单的事情。

1 个答案:

答案 0 :(得分:2)

以下是答案:

import/check %module.r checksum/secure to-binary mold/flat load/unbound/header %module.r

当然,通常你会预先计算校验和并将其用作文字,否则它对你的安全检查不会那么好:

import/check %module.r #{A3CD837D0CF843302221C074E88A64AA0147E07E}
相关问题