| 1 | package Crypt::OpenToken::Cipher::AES256; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | # Crypt::Rijndael will figure out whether its 128 or 256 bit mode depending on | ||
| 7 | # the key we use, so leverage the implementation in C:OT:C:AES128 | ||
| 8 | 1 | extends 'Crypt::OpenToken::Cipher::AES128'; | |
| 9 | |||
| 10 | 2 | ▶ | sub keysize { 32 } |
|
Subroutine
keysize: called CC=1 SCAR=0.0
Pod
documented
| |||
| 11 | |||
| 12 | 1 | 1; | |
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Crypt::OpenToken::Cipher::AES256 - AES256 encryption support for OpenToken | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | This library can be used by C<Crypt::OpenToken> to encrypt payloads using | ||
| 21 | AES-256 encryption. | ||
| 22 | |||
| 23 | =head1 METHODS | ||
| 24 | |||
| 25 | =over | ||
| 26 | |||
| 27 | =item keysize() | ||
| 28 | |||
| 29 | Returns the key size used for AES-256 encryption; 32 bytes. | ||
| 30 | |||
| 31 | =item iv_len() | ||
| 32 | |||
| 33 | Returns the length of the Initialization Vector needed for AES-256 encryption; | ||
| 34 | 16 bytes. | ||
| 35 | |||
| 36 | =item cipher($key, $iv) | ||
| 37 | |||
| 38 | Returns a C<Crypt::CBC> compatible cipher the implements the AES-256 | ||
| 39 | encryption. | ||
| 40 | |||
| 41 | =back | ||
| 42 | |||
| 43 | =head1 AUTHOR | ||
| 44 | |||
| 45 | Graham TerMarsch (cpan@howlingfrog.com) | ||
| 46 | |||
| 47 | =head1 COPYRIGHT & LICENSE | ||
| 48 | |||
| 49 | C<Crypt::OpenToken> is Copyright (C) 2010, Socialtext, and is released under | ||
| 50 | the Artistic-2.0 license. | ||
| 51 | |||
| 52 | =head1 SEE ALSO | ||
| 53 | |||
| 54 | L<Crypt::OpenToken::Cipher> | ||
| 55 | |||
| 56 | =cut | ||