The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Convert::SSH2::Format::PKCS8 - Format SSH key data as PKCS8

PURPOSE

This module formats SSH2 RSA public keys as PKCS8 strings.

These look like

  -----BEGIN PUBLIC KEY-----
  ... Base64 data ...
  -----END PUBLIC KEY-----

Generally, you shouldn't instantiate this class on its own. It will be called by Convert::SSH2 when needed.

ATTRIBUTES

asn

Holds an ASN converter. Defaults to Convert::ASN1.

asn_template

The ASN encoding template.

Defaults to:

    SEQUENCE {
        SEQUENCE {
            OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 1 1),
            NULL
        }
        BIT STRING {
            RSAPublicKey ::= SEQUENCE {
                modulus           INTEGER,  -- n
                publicExponent    INTEGER   -- e
            }
        }
    }

METHOD

generate()

Returns a PKCS8 formatted string, given n and e.

SEE ALSO

Convert::SSH2