SshPublicKey class
SSH Public Key file format as defined by RFC 4716.
This format is sometimes referred to as the "SSH2 public key" format or the "new OpenSSH public key format".
This encoding starts with "---- BEGIN SSH2 PUBLIC KEY ----".
defined by RFC 4716.
This encoding begins with a line that says "---- BEGIN SSH2 PUBLIC KEY ----" and ends with "---- END SSH2 PUBLIC KEY ----" with base-64 encoded data between them.
Note: this is different from the RFC 7468 textual encoding, which has 5 hyphens and no spaces in its encapsulation boundaries.
This format supports arbitrary headers. he comment header-tag is one of the defined header-tags.
Example
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA, converted by user@example.com"
AAAAB3NzaC1yc2EAAAADAQABAAABAQDJnryCPo8+CBrQL7U1sjaj/4CsuaH3x+4ooffB8d
KxJAw6J+DQQ044NQoNd1cNF6kgu27aaPC+evWaDjw0/dv4bGunyh3o3PWkutPpvTUptLWW
xKfxXmUQUrX5Pk5eXF6v5LQ9TNoeUbBdE92/QftSqQFR3nFwV2lm9bQBFOTQLBGSscja66
36caIQfV8lYgJyfg4IPZnNtMYEGxOzF9KZCO7pPsMh+4Js8FHj1gqg9Ri1pFyZLNIlgDRt
UA2qY+FD3FRC0ofBhI8V7VDVUoLzfHfedraizwsUbMZVvStC2GSory8zmPMp+emCBOISUm
vTwoeC+nHgDW3vKDaua1Ad
---- END SSH2 PUBLIC KEY ----
- Implemented types
Constructors
-
SshPublicKey(List<
SshPublicKeyHeader> headers, Uint8List bytes) - Default constructor.
- SshPublicKey.decode(String str, {int offset = 0, bool allowPreamble = true})
- Decode from text.
Properties
- bytes ↔ Uint8List
-
The decoded bytes
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ List<
SshPublicKeyHeader> -
The headers as a list of (header-tag, header-value) pairs.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source ↔ PubTextSource?
-
The text the key was decoded from
getter/setter pair
Methods
-
encode(
{bool doNotQuoteComments = false}) → String -
Encode into text
override
-
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
- beginMarker → const String
- Begin marker