TCL rc4套餐
我想学习如何使用 TCL rc4 包..我能找到的唯一文档都是具有相同 wiki 的不同站点,并且命令示例不起作用。
示例:
% set keydata [binary format H* 0123456789abcdef]
% rc4::rc4 -hex -key $keydata HelloWorld
3cf1ae8b7f1c670b612f
% rc4::rc4 -hex -key $keydata [binary format H* 3cf1ae8b7f1c670b612f]
HelloWorld
但是,当我运行完全相同的示例时,我得到:
% set keydata [binary format H* 0123456789abcdef]
% rc4::rc4 -hex -key $keydata HelloWorld
3cf1ae8b7f1c670b612f
% rc4::rc4 -hex -key $keydata [binary format H* 3cf1ae8b7f1c670b612f]
48656c6c6f576f726c64
我不确定 rc4 包如何区分加密和解密,实际的命令字符串显示为:
::rc4::rc4 ?-hex? -key keyvalue ?-command lst? ?-out channel? [ -in channel | -infile filename | string ]
另外,-command
是显然不是我正在寻找的,它执行完全不同的功能。我尝试过文件 i/o、echo,但似乎没有任何效果,并且文档中似乎确实缺少一些内容。
有人有使用这个包的经验吗?
I wanted to learn how to use the TCL rc4 package .. the only documentation I can find are all just different sites with the same wiki, and the command example doesn't work.
Example:
% set keydata [binary format H* 0123456789abcdef]
% rc4::rc4 -hex -key $keydata HelloWorld
3cf1ae8b7f1c670b612f
% rc4::rc4 -hex -key $keydata [binary format H* 3cf1ae8b7f1c670b612f]
HelloWorld
However, when I run exactly the same example, I get:
% set keydata [binary format H* 0123456789abcdef]
% rc4::rc4 -hex -key $keydata HelloWorld
3cf1ae8b7f1c670b612f
% rc4::rc4 -hex -key $keydata [binary format H* 3cf1ae8b7f1c670b612f]
48656c6c6f576f726c64
I'm not sure how the rc4 package differentiates between encryption and decryption, the actual command string is shown as:
::rc4::rc4 ?-hex? -key keyvalue ?-command lst? ?-out channel? [ -in channel | -infile filename | string ]
Also, -command
is not what I'm looking for apparently, it performs completely different function. I've tries file i/o, echo's, nothing seems to work, and there definitely seems to be something missing from the documentation.
Anyone with experience using this package?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论