GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Crypt::RSA::Parse(3) User Contributed Perl Documentation Crypt::RSA::Parse(3)

Crypt::RSA::Parse - Parse RSA keys

    #General-purpose, native RSA or PKCS8 (DER or PEM)
    my $public_rsa = Crypt::RSA::Parse::public($key_str);
    my $private_rsa = Crypt::RSA::Parse::private($private_key_str);

    $public_rsa->exponent();    #alias E()
    $public_rsa->modulus();     #isa Math::BigInt, alias N()
    $public_rsa->size();        #i.e., the modulus length in bits

    $private_rsa->version();        #usually 0
    $private_rsa->modulus();        #isa Math::BigInt, alias N()
    $private_rsa->size();           #i.e., the modulus length in bits

    $private_rsa->publicExponent();     #same as public “exponent”, alias E()
    $private_rsa->privateExponent();    #isa Math::BigInt, alias D()
    $private_rsa->prime1();             #isa Math::BigInt, alias P()
    $private_rsa->prime2();             #isa Math::BigInt, alias Q()
    $private_rsa->exponent1();          #isa Math::BigInt, alias DP()
    $private_rsa->exponent2();          #isa Math::BigInt, alias DQ()
    $private_rsa->coefficient();        #isa Math::BigInt, alias QINV()

    #Only checks PKCS8 (DER or PEM)
    $public_rsa = Crypt::RSA::Parse::public_pkcs8($pkcs8_str);
    $private_rsa = Crypt::RSA::Parse::private_pkcs8($pkcs8_str);

    {
        #If, for whatever reason, you don’t like MIME::Base64,
        #then customize this. The module must have a decode() function.
        #
        local $Crypt::RSA::Parse::BASE64_MODULE = '..';

        Crypt::RSA::Parse::...
    }

IMPORTANT: This distribution is no longer maintained. See its successor, Crypt::Perl, for a much more comprehensive toolkit.

Not much else to say: it parses RSA keys for useful information!

The public keys are represented via the "Crypt::RSA::Parse::Public" class, while private keys are represented via "Crypt::RSA::Parse::Private".

    Felipe M. L. Gasper
    CPAN ID: FELIPE

    https://github.com/FGasper/p5-Crypt-RSA-Parse

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

The full text of the license can be found in the LICENSE file included with this module.

2018-08-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.