perldoc > Crypt::Cipher::Camellia

🏷️ NAME

Crypt::Cipher::Camellia - Symmetric cipher Camellia, key size: 128/192/256 bits

🚀 Quick Reference

Use CaseCommandDescription
Create cipher object$c = Crypt::Cipher::Camellia->new($key);Instantiate with just a key
Create cipher object with rounds$c = Crypt::Cipher::Camellia->new($key, $rounds);Instantiate with key and custom rounds
Encrypt one block$ciphertext = $c->encrypt($plaintext);Raw block encryption (16 bytes)
Decrypt one block$plaintext = $c->decrypt($ciphertext);Raw block decryption (16 bytes)
Get key size$c->keysize; / Crypt::Cipher::Camellia->keysize;Returns key length in bytes
Get block size$c->blocksize; / Crypt::Cipher::Camellia->blocksize;Returns block size (16 bytes)
Get max key size$c->max_keysize;Returns maximum key length (32 bytes)
Get min key size$c->min_keysize;Returns minimum key length (16 bytes)
Get default rounds$c->default_rounds;Returns the default number of rounds

📜 SYNOPSIS

  ### example 1
  use Crypt::Mode::CBC;

  my $key = '...'; # length has to be valid key size for this cipher
  my $iv = '...';  # 16 bytes
  my $cbc = Crypt::Mode::CBC->new('Camellia');
  my $ciphertext = $cbc->encrypt("secret data", $key, $iv);

  ### example 2 (slower)
  use Crypt::CBC;
  use Crypt::Cipher::Camellia;

  my $key = '...'; # length has to be valid key size for this cipher
  my $iv = '...';  # 16 bytes
  my $cbc = Crypt::CBC->new( -cipher=>'Cipher::Camellia', -key=>$key, -iv=>$iv );
  my $ciphertext = $cbc->encrypt("secret data");

📖 DESCRIPTION

This module implements the Camellia cipher. Provided interface is compliant with Crypt::CBC module.

BEWARE: This module implements just elementary "one-block-(en|de)cryption" operation - if you want to encrypt/decrypt generic data you have to use some of the cipher block modes - check for example Crypt::Mode::CBC, Crypt::Mode::CTR or Crypt::CBC (which will be slower).

🛠️ METHODS

🔗 SEE ALSO

Crypt::Cipher::Camellia
🏷️ NAME 🚀 Quick Reference 📜 SYNOPSIS 📖 DESCRIPTION 🛠️ METHODS 🔗 SEE ALSO

Generated by phpman v4.9.25-4-g0d844aa · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-07 09:11 @216.73.217.93
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^