Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 20.2 ('Colorominoes')
Instant purchase and download via GumRoad!

FEATURE

Cipher Part 6

How to Use Data Encryption Standard Cryptography

Issue: 20.2 (March/April 2022)
Author: Eugene Dakin
Author Bio: Eugene works as a Senior Oilfield Technical Specialist. He has university degrees in the disciplines of Engineering, Chemistry, Biology, Business, and a Ph.D. in Chemical Engineering. He is the author of dozens of books on Xojo available on the xdevlibrary.com website.
Article Description: No description available.
Article Length (in bytes): 18,655
Starting Page Number: 34
Article Number: 20204
Resource File(s):

Download Icon project 20204.zip Updated: 2022-03-01 10:25:58

Related Link(s): None

Excerpt of article text...

This article explains the DES (Data Encryption Standard) encryption algorithm created from scratch, and is written in native Xojo code. This means there are no plugins required, and the portable module and its methods should work on all of the operating systems supported by Xojo.

DES was the most-used encryption algorithm in the world, but is being replaced by the AES and triple-DES algorithms. This algorithm was heavily used by the banking and government agencies, and is still used in many applications where security is required.

To use the program, create your own eight-letter key—the string "Computer" was used in the below example (see Figure 1). Press the Create button to create the ASCII hexadecimal string that will be used by the DES Encryption algorithm. Type your message in the Clear Text box, which by default has the message "I Wish I Knew how to encrypt with DES!"

Press the Encrypt button and both the Hex Key and the plain text message will be converted to a DES Hex Encoded message. To decrypt the message, use the same Hex Key and paste the DES Hex Encoded Message in the lower right corner and press the Decrypt key. The decrypted message will appear!

Code has been created in a portable method called DESAlgorithm that can be dragged-and-dropped to your own applications. The two main methods are DESEncrypt, which encrypts a message, and DESDecrypt which decrypts the message.

The Algorithm

...End of Excerpt. Please purchase the magazine to read the full article.