Expand description
Computes the encrypted part, using all keys
Given a set of keys and a vector of bytes, it iterates the keys and for every valid key (key.method == 0), it encrypts the packet. It uses chacha20 and poly1305 to encrypt the packet. It returns a set of encrypted segments that represent the packet for every key.
packet
is a vector of bytes of information to be encryptedkeys
is a unique collection of keys withkey.method
== 0