struct Cipher
XuAPI
pub struct Cipher {
pub s []int
pub i int
pub j int
}用途
Rc4 密码算法的分组或流式加解密上下文。
公开字段
s[]int- 源字符串
iint- 下标或整数
jint- 下标
#crypto/rc4RC4 流密码。算法已破,仅协议互通。
struct Cipherpub struct Cipher {
pub s []int
pub i int
pub j int
}Rc4 密码算法的分组或流式加解密上下文。
s []inti intj intnew_cipherpub fn new_cipher(key &string) Cipher构造 cipher。失败时抛出错误,调用方需处理或继续传播。
key &stringCipher — 该类型的值
($&Cipher) xor_key_streampub fn (c $&Cipher) xor_key_stream(src &string) string$&Cipher 上的操作:执行 xor key stream 操作。
c $&CipherCipher 实例;以独占借用传入,方法可修改它,调用方仍持有实例。src &stringstring — 结果字符串