Skip to content

Common Lisp system for OpenSSL compatible AES encryption

License

Notifications You must be signed in to change notification settings

Junker/easy-aes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy-AES

Perform AES-256 (CBC) encryption/decryption compatible with OpenSSL, CryptoJS, Gibberish AES and other libraries.

Installation

This system can be installed from UltraLisp like this:

(ql-dist:install-dist "http://dist.ultralisp.org/"
                      :prompt nil)
(ql:quickload "easy-aes")

Usage

encrypting data:

(easy-aes:encrypt some-string "my-password") ; returns encypted base64 string
;; or
(easy-aes:encrypt some-vector "my-password")
;; or
(easy-aes:encrypt some-stream "my-password")
;; or
(easy-aes:encrypt some-string "my-password" :uri t) ; returns encypted base64 string suitable for URL

decrypting data:

(easy-aes:decrypt b64-string "my-password")
;; or
(easy-aes:decrypt b64-stream "my-password")
;; or
(easy-aes:decrypt b64-url-string "my-password" :uri t)

example:

(babel:octets-to-string
 (easy-aes:decrypt (easy-aes:encrypt "test123" "pass")
                   "pass")) 
;; => "test123"