Push Notifications by 2018
Author:2018
Language: eng
Format: epub
Publisher: Ray Wenderlich
Implementing the ROT13 cipher
In your Payload Modification target create a new Swift file named ROT13.swift and paste this code into it:
import Foundation struct ROT13 { static let shared = ROT13() private let upper = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZ") private let lower = Array("abcdefghijklmnopqrstuvwxyz") private var mapped: [Character: Character] = [:] private init() { for i in 0 ..< 26 { let idx = (i + 13) % 26 mapped[upper[i]] = upper[idx] mapped[lower[i]] = lower[idx] } } public func decrypt(_ str: String) -> String { return String(str.map { mapped[$0] ?? $0 }) } }
You can find many different ways of implementing this cipher in Swift. The above is just a quick and dirty way to handle the American English alphabet.
Obviously, the above code makes a nice sample for a book as it doesn’t require downloads and configuration. However, for real security, you should look to something like the CryptoSwift (https://cryptoswift.io/) library.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Cryptography | Encryption |
Hacking | Network Security |
Privacy & Online Safety | Security Certifications |
Viruses |
Effective Threat Investigation for SOC Analysts by Yahia Mostafa;(6211)
Practical Memory Forensics by Svetlana Ostrovskaya & Oleg Skulkin(5912)
Machine Learning Security Principles by John Paul Mueller(5890)
Attacking and Exploiting Modern Web Applications by Simone Onofri & Donato Onofri(5548)
Operationalizing Threat Intelligence by Kyle Wilhoit & Joseph Opacki(5532)
Solidity Programming Essentials by Ritesh Modi(3844)
Microsoft 365 Security, Compliance, and Identity Administration by Peter Rising(3489)
Mastering Python for Networking and Security by José Manuel Ortega(3323)
Future Crimes by Marc Goodman(3316)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3313)
Blockchain Basics by Daniel Drescher(3276)
Operationalizing Threat Intelligence by Joseph Opacki Kyle Wilhoit(3201)
Learn Computer Forensics - Second Edition by William Oettinger(2997)
Mobile App Reverse Engineering by Abhinav Mishra(2867)
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2842)
The Code Book by Simon Singh(2777)
From CIA to APT: An Introduction to Cyber Security by Edward G. Amoroso & Matthew E. Amoroso(2764)
Incident Response with Threat Intelligence by Roberto Martínez(2689)
The Art Of Deception by Kevin Mitnick(2587)
