struct Cipher
XuAPI
pub struct Cipher {
pub s []int
pub i int
pub j int
}用途
公开结构体 `Cipher`。
参数
s[]int- 源字符串
iint- 下标或整数
jint- 下标
API
#crypto/rc4RC4 流密码。算法已破,仅协议互通。
struct Cipherpub struct Cipher {
pub s []int
pub i int
pub j int
}公开结构体 `Cipher`。
s []inti intj intnew_cipherpub fn new_cipher(key &string) Cipher构造 cipher。失败时 throw。
key &stringCipher — 该类型的值
(&mut Cipher) xor_key_streampub fn (c &mut Cipher) xor_key_stream(src &string) string`&mut Cipher` 上的方法:xor键流。
c &mut Ciphersrc &stringstring — 结果字符串