3 ms·
Quote: "Our decryption function is basically the same, but in reverse" and follows with a full decrypt function. A very simple optimization is to use encrypt f
by unnouinceput 5y ago
Quote: "Our decryption function is basically the same, but in reverse" and follows with a full decrypt function.
A very simple optimization is to use encrypt function to decrypt the encrypted message by providing the "inverse key" as parameter, which is a 2 line function altogether. Implementation of said implementation is left as an exercise for the reader.