Skip to content

u8vector decrypt blowfish

Chris Petersen edited this page Oct 16, 2014 · 1 revision

u8vector-decrypt-blowfish decrypts an u8vector using Blowfish

Parameter Description
keyidx Key index (0-15), 0 unless more than one encryption key is used
vect u8vector to be decrypted

Example

Example 1: Setup blowfish encryption key, encrypt a string and decrypt it again. Requires libcrypto to be in the consoles' LIBRARIES file and rupi to be in the console's MODULES file.

> (u8vector-setkey-blowfish 0 (string->u8vector "BlowFish"))
> (define mystring "The brown fox jumps over the lazy dog!")
> (define encrypted (u8vector-encrypt-blowfish 0 (string->u8vector mystring)))
> (display encrypted)
> (define decrypted (u8vector->string (u8vector-decrypt-blowfish 0 encrypted)))
> (string=? mystring decrypted)
Clone this wiki locally