PvtKeyEncoding enum

Supported private key encodings.

This enumeration is used to indicate the format that a private key was decoded from, or to specify the desired format to PrivateKeyExt.encode which is an extension on pointy_castle.PrivateKey.

openSsh

OpenSSH private key format.

This is a proprietary encoding used by newer versions of the OpenSSH implementation.

This encoding starts with -----BEGIN OPENSSH PRIVATE KEY-----. For example:

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdz
c2gtcnNhAAAAAwEAAQAAAQEA2MHejuGfkkzMU5RQj3DfFQKvWTSr2kEWG7BAyitM
...
-----END OPENSSH PRIVATE KEY-----

puttyPrivateKey

Private key format used by PuTTY, an SSH client for Microsoft Windows.

This encoding starts with a line beginning with PuTTY-User-Key-File-2: For example,

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment:
Public-Lines: 6
AAAAB3NzaC1yc2EAAAADAQABAAABAQDYwd6O4Z+STMxTlFCPcN8VAq9ZNKvaQRYb
sEDKK0ydvTxdwt72xRo8supYX1vgDgRpYBhgDy8OPEMLDuk61sXRdbTITFW1B98r
...
Private-Lines: 14
AAABAQCfdbhaGsf+o/rpPcIqVFn5JfmDwcjvjlRKWFbBpCsAHFgNji/jEMulfeYC
z1xSr101fFlSSblPWqvjtbuE6r2qw1IUzHt862aVg5q9wC9gWt6ZbUqRXXxbmzLu
...
Private-MAC: 73aa9bbe1b00c5f2c2fdb777dd8d749213f313f3

pkcs1

Textual encoding of PKCS #1.

This encoding is often referred to as "PEM". But that term is ambiguous, since PEM encoding is used to encode other types of binary data besides public keys. Implementations of PEM encoding also vary.

This encoding is used by older versions of OpenSSH.

This implementation uses the textual encoding of RFC 7468, which specifies a unified and interoperable version of PEM and PEM-like text_encodings.

Strictly speaking, this encoding is not PKCS #1, but the RFC 7468 textual encoding of binary data conforming to PKCS #1.

This encoding starts with -----BEGIN RSA PRIVATE KEY-----. For example,

-----BEGIN RSA PRIVATE KEY-----
AAAAAAAAAQEA2MHejuGfkkzMU5RQj3DfFQKvWTSr2kEWG7BAyitMnb08XcLe9sUa
PLLqWF9b4A4EaWAYYA8vDjxDCw7pOtbF0XW0yExVtQffK1LL7yxGBzOMCUJ5Fmb3
...
-----END RSA PRIVATE KEY-----
Inheritance

Constructors

PvtKeyEncoding()
const

Values

openSsh → const PvtKeyEncoding

OpenSSH Private Key

puttyPrivateKey → const PvtKeyEncoding

PuTTY Private Key

pkcs1 → const PvtKeyEncoding

RSA Private Key

This is also the original OpenSSH private key format (before it switched to using the new openSsh format).

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<PvtKeyEncoding>
A constant List of the values in this enum, in order of their declaration.