CAST-128 encryption library
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/Crypt Document Crypt::CAST5.new Nov 5, 2018
t Initial commit Nov 5, 2018
.gitignore Initial commit Nov 5, 2018
.travis.yml Initial commit Nov 5, 2018
CHANGELOG Initial commit Nov 5, 2018
LICENSE Initial commit Nov 5, 2018
META6.json Initial commit Nov 5, 2018
README.md Document Crypt::CAST5.new Nov 5, 2018
dist.ini Initial commit Nov 5, 2018

README.md

Build Status

NAME

Crypt::CAST5 - CAST-128 encryption library

SYNOPSIS

use Crypt::CAST5;

my Crypt::CAST5 $cast5   .= new: 'ayy lmao';
my Str          $in       = 'ayy lmao';
my Blob         $encoded  = $cast5.encode: $in.encode;
my Blob         $decoded  = $cast5.decode: $encoded;
my Str          $out      = $decoded.decode;
say $out; # ayy lmao

DESCRIPTION

Crypt::CAST5 is a library that handles encryption and decryption using the CAST-128 algorithm.

METHODS

  • new(Str $key --> Blob)

Constructs a new instance of Crypt::CAST5 using the given key. The key must be 5-16 characters long.

  • encode(Blob $in --> Blob)

Encodes $in using CAST-128 encryption and returns the result.

  • decode(Blob $in --> Blob)

Decodes $in using CAST-128 encryption and returns the result.

AUTHOR

Ben Davies (Kaiepi)

COPYRIGHT AND LICENSE

Copyright 2018 Ben Davies

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.