# How to program Caesar cipher in Glide?

**URL:** https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468
**Category:** Ask for Help
**Created:** [July 14, 2022, 12:37pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468 "2022-07-14T12:37:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)
#### Post date: [July 14, 2022, 12:37pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/1 "2022-07-14T12:37:26Z")

</div>

Hi!

What is the best way to program Caesar cipher in Glide tables?

> **[Caesar cipher](https://en.wikipedia.org/wiki/Caesar_cipher)**
>
> In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspon...

Thanks!

---

<div class="post-metadata">

### Author: ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)
#### Post date: [July 14, 2022, 3:14pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/2 "2022-07-14T15:14:47Z")

</div>

For that, it seems you’d have to break apart a string into its component parts (letters) and put it back together again with different lettering. Decrypting would be the reverse of the same process.

You might get some hints from this thread:

> [@brain Glide Games - How It's Made - Wordle, Boggle, and more (office hours)](https://community.glideapps.com/t/glide-games-how-its-made-wordle-boggle-and-more-office-hours/38790):
>
> ​Come learn how expert Glide builders are re-creating games in Glide! Over the next few Fridays, brain Glide Games is taking over my [office hours](https://community.glideapps.com/t/live-glide-training-with-darren-on-fridays-q-a/36785) segment. :star2:Here’s the star line up and schedule :star2: ​Friday, Feb 25th @Robert_Petitto will share how he created [Boggle](https://community.glideapps.com/t/i-built-boggle-glide-games/38650) AND [Mastermind](https://community.glideapps.com/t/glide-games-mastermind/33673) in Glide. ​Friday, March 4th @Darren_Alderman will attempt to recreate [Wordle](https://www.nytimes.com/games/wordle/index.html) in Glide. open_mouthpoint_down Register Here point_down

It’s probably going to be easiest to do something in Javascript. The second thing I’d look at would be an API.

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [July 14, 2022, 3:53pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/3 "2022-07-14T15:53:53Z")

</div>

I’m not-so-secretly hoping for a hold-my-beer one-single-computed-column solution from Jeff. This would be fun.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [July 14, 2022, 4:00pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/4 "2022-07-14T16:00:45Z")

</div>

I guess it depends if the cipher could ever change. The easiest way to do it would be to use a template column to replace the values. You would just need 26 replacements. That’s a single column. 😉

Otherwise a javascript column could give you something more robust.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 14, 2022, 4:28pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/5 "2022-07-14T16:28:29Z")

</div>

yeah, JavaScript would be the way to go here.

> <https://stackoverflow.com/questions/44232645/caesar-cipher-in-javascript>

---

<div class="post-metadata">

### Author: ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)
#### Post date: [July 14, 2022, 5:23pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/6 "2022-07-14T17:23:21Z")

</div>

Thanks Darren! You helped me again.

---

<div class="post-metadata">

### Author: ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)
#### Post date: [July 14, 2022, 5:27pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/7 "2022-07-14T17:27:48Z")

</div>

I don’t understand sources for replacements. How to split the word and make it work. So I did it for now with javascript.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [July 14, 2022, 5:39pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/8 "2022-07-14T17:39:04Z")

</div>

In a template column, the source value would be the column that contains the value that you want to apply the cipher to. Then you would create replacement value for each letter of the alphabet. letter A could be replaced with letter C, letter B could be replaced with letter D, and so on. No need to split anything. You are just being in the value to be ciphered, and replacing each letter with a different letter.

> **[Template Column](https://docs.glideapps.com/all/topics/computed-columns/primary/template-column)**
>
> Create labels or messages based on other columns in your table

But, the JavaScript is the better option.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [July 15, 2022, 5:39pm UTC](https://community.glideapps.com/t/how-to-program-caesar-cipher-in-glide/44468/9 "2022-07-15T17:39:44Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
