aes.cr v0.1.2

crystal wrapper for OpenSSL AES CBC mode encryption routines

aes.cr

Wrapper for openssl's AES encryption and decryption functionality.

Installation

OpenSSL development packages are required for this shard to build. On apt-based systems this can be installed via sudo apt install libssl-dev.

Add this to your application's shard.yml:

dependencies:
  aes:
    github: sam0x17/aes.cr

Usage

require "aes"

aes = AES.new
puts aes.decrypt(aes.encrypt("hello world")) # => "hello world"
data = Bytes[0, 33, 128, 145, 77, 43, 32, 189, 250, 123]
puts aes.encrypt(data) # => encrypted bytes
puts aes.iv
puts aes.key

See src/aes.cr for full API info. Streaming is supported.

Repository

aes.cr

Owner
Statistic
  • 1
  • 1
  • 0
  • 1
  • 0
  • over 3 years ago
  • December 24, 2018
License

MIT License

Links
Synced at

Thu, 02 May 2024 00:59:33 GMT

Languages