Chef::Encoder
1.1
use Chef::Encoder; my $obj = new Chef::Encoder ( 'data' => $data , 'private_key_file' => ../data/private_key.pem ); $obj->pki->sign ( 'data' => $data ); $obj->sha1->digest ( 'data' => $data ); $obj->base64->encode( 'data' => $data ); $obj->base64->decode( 'data' => $data );
This module imiplements methods that perform the encoding and decoding and signing of the header once you load this module it will inturn load three classes
Chef::Encode::pki
Chef::Encode::sha1
Chef::Encode::base64
return new object initialzied as per %params.
returns $private_key_file
returns $private_key
returns $data
loads Chef::Encoder::pki class and returns new object of class Chef::Encoder::pki it accepts ( 'private_key_file' => $private_key_file , 'private_key' => $private_key ) if none is provided it will try to use the values initialized from parent class Chef::Encoder
Chef::Encoder::pki
1.0
This class provides siging request as per private key specified.
returns signed data based on the private_key_file or privete_key
loads Chef::Encoder::sha1 class and returns new object of class Chef::Encoder::sha1 it accepts ( 'data' => $data ) if none is provided it will try to use the values initialized from parent class Chef::Encoder
Chef::Encoder::sha1
This class provides sha1 digest of the data initialized
it accepts data as parameter $obj->digest( 'data' => $data ) returns sha1 digest in binary encoded with base64 of the data passed.
loads Chef::Encoder::base64 class and returns new object of class Chef::Encoder::base64 it accepts ( 'data' => $data ) if none is provided it will try to use the values initialized from parent class Chef::Encoder
Chef::Encoder::base64
This class provides base64 encoding and ecoding functionality
it accepts data as parameter $obj->encode( 'data' => $data ) returns base64 encoded value of data
it accepts data as parameter $obj->decode( 'data' => $data ) returns base64 decoded value of data
open a github ticket or email comments to Bhavin Patel <bpatel10@nyit.edu>
This Software is free to use , licensed under : The Artisic License 2.0 (GPL Compatible)
To install Chef::REST::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chef::REST::Client
CPAN shell
perl -MCPAN -e shell install Chef::REST::Client
For more information on module installation, please visit the detailed CPAN module installation guide.