struct Cipher
XuAPI
pub struct Cipher {
pub s []int
pub i int
pub j int
}Purpose
Rc4 Cipher context for block or stream encryption/decryption.
Public fields
s[]int- source string
iint- index or integer
jint- index
#crypto/rc4RC4 stream cipher. Broken; kept for protocol interop only.
struct Cipherpub struct Cipher {
pub s []int
pub i int
pub j int
}Rc4 Cipher context for block or stream encryption/decryption.
s []inti intj intnew_cipherpub fn new_cipher(key &string) CipherConstruct cipher. Throws on failure; handle the error or propagate it to the caller.
key &stringCipher — a value of this type
($&Cipher) xor_key_streampub fn (c $&Cipher) xor_key_stream(src &string) stringOperation on $&Cipher: xor key stream.
c $&CipherCipher instance used by this call (exclusive borrow).src &stringstring — result string