TheDankBank

Code for banking client project for OPL.

Download as .zip Download as .tar.gz View on GitHub

Authors

Tyler Alterio

Mike Overy

Matt Wolf

Overview

The Dank Bank: A banking application using cryptography to store your precious memes and lambdas

Screenshots

screenshot of the main window the create account window

Concepts Demonstrated

External Technology and Libraries

Favorite Lines of Code

Matt (@mattwollf)

My favorite lines of code are the Vigenere cipher text generating function. The keylist defined generates a keylist from the keyword which matches the length of the password. The function body uses map and foldr to concisely apply the vigenere cipher with the keylist to the password, and convert the resulting cipher text back to a string.

(define (vigenere-cipher password keyword method)
  (define (folder-proc a b result)
    (cons (shift a b method) result))
  (define keylist (gen-v-key (string-length password) keyword))
  (list->string (map chr (foldr folder-proc '() (map ord (string->list password)) keylist))))

Tyler (@tyalt1)

My favorite lines of code are the function that inserts into the database. It takes an account and adds its username, password, and account, into the database. The way the SQL query is written, the function can be used to add a new account and change an existing account.

(define (insert-to-db account)
  (let ((username (account 'get-username))
        (password (account 'get-password))
        (balance  (account 'get-balance)))
    (query-exec dbc 
                "REPLACE INTO accounts(login, password, amount) VALUES ($1, $2, $3)"
                username 
                password 
                balance)))

Mike (@movery)

"It's just so simple" - Confucius 2015

(define nil '())

How to Download and Run

Open BankClient.rkt in DrRacket and run.

Website on Github Pages