Crypt::Keyczar::Signer - Sign and Verify data using sets of symmetric or private keys.


NAME

Crypt::Keyczar::Signer - Sign and Verify data using sets of symmetric or private keys.


SYNOPSIS

  use Crypt::Keyczar::Signer;
  
  my $signer = Crypt::Keyczar::Signer->new('/path/to/keyset');
  my $signature = $signer->sign($message);
  $signer->verify($message, $signature) ? 'OK' : 'NG';


DESCRIPTION

the Crypt::Keyczar::Signer manpage may both sign and verify data using sets of symmetric or private keys. Sets of public keys may only used with the Crypt::Keyczar::Verifier manpage objects. the Crypt::Keyczar::Singer manpage objects should be used with symmetric or private key sets to generate signatures.


METHODS

* new($keyset_path)

Create a new the Crypt::Keyczar::Signer manpage object with a file-based key set location. This will attempt to read the keys using a the Crypt::Keyczar::FileReader manpage. The corresponsing key set must have a purpose of crypt. $keyset_path is directory containing a key set.

* new($reader_object)

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

* sign($message)

Sign the given $message and return a signature.

* sign($message, $expiration_time)

Sign the given $message and return a signature with expiration.

* verify($message, $signature>)

Verifies a $signature on the given $message.


SEE ALSO

bin/keyczar, the Crypt::Keyczar manpage, the Crypt::Keyczar::Verifier 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::Signer - Sign and Verify data using sets of symmetric or private keys.