DESCRIPTION

Object Methods

Returns an encrypted serialisation of the data. The encryption works by serialising the data as \s-1RDF/XML\s0, then encrypting it with \*(C`encrypt_text\*(C'. This method only works on objects that were constructed using \*(C`new_from_webid\*(C'. Encrypts the model for the holder of the WebID, and sends it to an address specified in the WebID profile using foaf:mbox. Options:

  • sendmail - hashref of options for Mail::Transport::Sendmail. The mere presence of this hashref will trigger Mail::Transport::Sendmail to be used as the delivery method.

  • smtp - hashref of options for Mail::Transport::SMTP. The mere presence of this hashref will trigger Mail::Transport::SMTP to be used as the delivery method.

  • from - email address for the message to come from.

  • subject - message subject.

  • filename - filename for encrypted attachment.

  • headers - hashref of additional mail headers.

Returns a the message's Message-ID, or undef if unsuccessful.

Encrypts a literal string which may or may not have anything to do with \s-1RDF\s0. The return value is a base64-encoded string. The base64-decoded value consists of: (1) an initialisation vector, sixteen bytes shorter than the size of the key; (2) a 16-bit big-endian signed integer indicating the length of padding which was added to the payload of the message during encryption; (3) the payload, encrypted using cipher-block chaining with \s-1OAEP\s0, with block length sixteen bytes shorter than the key size. These three parts are concatenated together in that order.

Required Methods

This role does not implement these methods, but requires classes to implement them instead: Scrambles an octet string.

RELATED TO RDF::Crypt::Role::DoesEncrypt…

RDF::Crypt, RDF::Crypt::Encrypter, RDF::Crypt::Decrypter.

BUGS

Please report any bugs to <http://rt.cpan.org/>.

AUTHOR

Toby Inkster <[email protected]>.

COPYRIGHT

Copyright 2010, 2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES

\s-1THIS\s0 \s-1PACKAGE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.