00:01
Alright, so we have a caesar cipher is something where you just take every character in a message and replace it by something some number of things down in this given example here sourpuss will be encoded to uku2 if the key value is 2 and it actually tells us exactly how to do this real quick.
00:23
How to do this, how to add something to a character what we can do then is just have our plaintext message for example sourpuss and then our ciphertext we need to populate that with the encoded things.
00:42
So we're going to go character by character so we need to get so we need to see for h in plaintext we're going to have the ciphered letter and we call that i'll call code letter cl for code letter we have this character orid ch plus key of course our key here as a test is 2 and then for each of these equals cl once we find out what the encoded letter is we want to put that into the ciphertext i'm going to test this out ciphertext and see if this gets what we want in fact, yeah, there we go.
01:41
We go from sourpuss to this excuse me, we can even do it for logger messages give us some more letters and there we go, we get all this but the question here is that we want to encode and decode ciphers so all of this is in the encoding thing this is what all of that does and we'll just set the key by default is equal to so now we can here just print encode we don't want to worry about it.
02:45
It's going to we get exactly what we want but what about the decoding? well, that's actually going to be very similar to this all we have to do is subtract the key instead of add it to go backwards, right? so now if we try and decode this message here what we should get instead of encode and we also rewrote that...