Skip to content

Instantly share code, notes, and snippets.

View KYC3909's full-sized avatar

Krunal Chauhan KYC3909

  • Defsys Development India Pvt Ltd
  • Ahmedabad, India
  • 13:25 (UTC +05:30)
  • LinkedIn in/chauhankrunal3909
View GitHub Profile
@KYC3909
KYC3909 / CaesarCipher.swift
Last active October 5, 2023 09:21
Cryptography: Caesar Cipher Encryption / Decryption in Swift
let originalString = "Hello"
let encodedPlacement = 4
var cipheredString = ""
var decipheredString = ""
func CaesarCipherEncrypt(_ str: String, _ num: Int) -> String {
var result = "";
for ch in str {
if let asciiValue = ch.asciiValue {