Crypt::Keyczar::Crypter - Crypter may both encrypt and decrypt data.


NAME

Crypt::Keyczar::Crypter - Crypter may both encrypt and decrypt data.


SYNOPSIS

  use Crypt::Keyczar::Crypter;
  
  my $crypter = Crypt::Keyczar::Crypter->new('/path/to/keysets');
  my $ciphertext = $crypter->encrypt('Secret message');
  my $plain_text = $crypter->decrypt($ciphertext);


DESCRIPTION

the Crypt::Keyczar::Crypter manpage may both encrypt and decrypt data using sets of symmetric or private keys. Sets of public keys may only be used with the Crypt::Keyczar::Encrypter manpage objects.


METHODS

* new($keyset_path)

Create a new the Crypt::Keyczar::Crypter manpage with file-based keyset location. This will attempt to read the keys using a the Crypt::Keyczar::FileReader manpage. The corresponding key set must have a purpose of crypt.

* new($reader_object)

Create a new the Crypt::Keyczar::Crypter manpage with a Crypt::Keyczar::Reader object.

* encrypt($input)

Encrypt the given $input. return the encrypted cipher text.

* decrypt($input)

Decrypt the given $input ciphertext. return the decrypted plain text.


SEE ALSO

bin/keyczar, the Crypt::Keyczar manpage, the Crypt::Keyczar::Encrypter manpage, http://www.keyczar.org/


AUTHOR

Hiroyuki OYAMA <oyama@mixi.co.jp>


LICENSE

Licensed under the Apache License, Version 2.0 (the ``License''); you may not use this file except in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ``AS IS'' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

 Crypt::Keyczar::Crypter - Crypter may both encrypt and decrypt data.