CHips L MINI SHELL

CHips L pro

Current Path : /proc/2/root/usr/local/share/man/man3/
Upload File :
Current File : //proc/2/root/usr/local/share/man/man3/OAuth::Lite::SignatureMethod.3pm

.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "OAuth::Lite::SignatureMethod 3"
.TH OAuth::Lite::SignatureMethod 3 "2014-01-04" "perl v5.10.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
OAuth::Lite::SignatureMethod \- signature method base class
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&    say $signature_method_class\->method_name;
\&
\&    my $method = $signature_method_class\->new(
\&        consumer_secret => $consumer_secret,
\&        token_secret    => $token_secret,
\&    );
\&
\&    my $signature = $method\->sign($text);
\&
\&    if ($method\->verify($text, $signature)) {
\&        say "valid signature";
\&    }
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
SignatureMethod base class.
Create subclasses for arbitrary signature method inheriting this class.
.SH "METHODS"
.IX Header "METHODS"
.SS "build_body_hash($content)"
.IX Subsection "build_body_hash($content)"
Build body hash according to the spec
http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
.PP
.Vb 2
\&    my $hash = $method_class\->build_body_hash($content);
\&    say $hash;
.Ve
.SS "method_name($method_name)"
.IX Subsection "method_name($method_name)"
Set signature method name.
Use this in subclass.
.PP
.Vb 2
\&    $method_class\->method_name(\*(AqHMAC\-SHA1\*(Aq);
\&    say $method_class\->method_name;
.Ve
.SS "new(%params)"
.IX Subsection "new(%params)"
.Vb 4
\&    my $method = $signature_method_class\->new(
\&        consumer_secret => $consumer_secret,
\&        token_secret    => $token_secret,
\&    );
.Ve
.SS "secrets_as_key"
.IX Subsection "secrets_as_key"
Returns consumer_secret and token_secret as encoded key format.
.PP
.Vb 1
\&    my $key = $method\->secrets_as_key;
.Ve
.SS "sign($base_text)"
.IX Subsection "sign($base_text)"
Create signature from passed base text
.PP
This is an abstract method.
Define this in subclass.
.PP
.Vb 1
\&    my $signature = $method\->sign($base_text);
.Ve
.ie n .SS "verify($base_text, $signature)"
.el .SS "verify($base_text, \f(CW$signature\fP)"
.IX Subsection "verify($base_text, $signature)"
Check if signature is valid with base text
.PP
.Vb 4
\&    my $signature_is_valid = $method\->verify($base_text, $signature);
\&    if ($signature_is_valid) {
\&        ...
\&    }
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
OAuth::Lite::SignatureMethod::HMAC_SHA1
OAuth::Lite::SignatureMethod::PLAINTEXT
OAuth::Lite::SignatureMethod::RSA_SHA1
.SH "AUTHOR"
.IX Header "AUTHOR"
Lyo Kato, \f(CW\*(C`lyo.kato _at_ gmail.com\*(C'\fR
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.6 or,
at your option, any later version of Perl 5 you may have available.

Copyright 2K16 - 2K18 Indonesian Hacker Rulez