PuttyPrivateKey class

Represents the PuTTY Private Key format.

Example

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: someone@example.com
Public-Lines: 6
AAAAB3NzaC1yc2EAAAADAQABAAABAQDJnryCPo8+CBrQL7U1sjaj/4CsuaH3x+4o
offB8dKxJAw6J+DQQ044NQoNd1cNF6kgu27aaPC+evWaDjw0/dv4bGunyh3o3PWk
utPpvTUptLWWxKfxXmUQUrX5Pk5eXF6v5LQ9TNoeUbBdE92/QftSqQFR3nFwV2lm
9bQBFOTQLBGSscja6636caIQfV8lYgJyfg4IPZnNtMYEGxOzF9KZCO7pPsMh+4Js
8FHj1gqg9Ri1pFyZLNIlgDRtUA2qY+FD3FRC0ofBhI8V7VDVUoLzfHfedraizwsU
bMZVvStC2GSory8zmPMp+emCBOISUmvTwoeC+nHgDW3vKDaua1Ad
Private-Lines: 14
AAABAF9IgVYcMp3iPqm8oirqOiBvE2SNphnvhoH1aZ1ip2vH2W9ygTBrXn/5sPKE
P8OUNv2dFtppVbzvZzqTF6kDf/17X7VAM7plEkHzeUqxfHplSJwj/Cp5rdF1BULx
SyAVDzqZHwUJWNuTR4H1bYqBqEB8Vn9WXM32wX1DCPqp4Sjvk+80P9edf3+Y5IFC
VgQmbPUVM2GKzhBOe1FjroHnWwIWr/O7oZzBDZqzF4y0R0i8okqsCCDqSWkvM29A
8syTYEV6VyUxVdfXTiApg3wYdWhB0VWpXJ4qbN1L3jGFawlQHUM/5tj3O+swjMrt
LTd5Y/2ce8si9MU03Qkvl4RzEhEAAACBAOVzVG2+no81XG1hOo5t3AQe9QrY0Sr8
vhZSZ6Wh9cTtEASc187D5kYXxyGxs0vO0RdC0XT1cLizGrnv8RHsqHw5Jq0yEnJg
pzbAs2MZAJAESQRlQbWpP4rFPDEgD1hd0ZB+5CgeY1qP7x7cku+D6tdAScr3WhQt
RND9CWhIyI9zAAAAgQDg8wbfjvuQMmqBVn+wS6NX7cCNj4RfhA5+f6+pZnvooVhq
Mh8IiD+JI1SdAUV18YzjAQmy3VeSQp3YImn54IdII3OW3m0BoWzq5tW4ZKPMYMaY
7+ksbCDzEfxZUpyPjr3W4S3VQEWoL+A1LT9+VmitBGhs3myf4yxPVQEC7rCeLwAA
AIEA2lwJ3kfWf2HtBy93o+Pye9m1BHaGGr8RzpsfTHwlQv+4zw7HpY6P1l8gkgUV
yDNARZ0FYVsz9fs0iTacT3kqxYVvR4KlI1RbdOibb/k/pkzwbv4I2zn/UuIjP+TS
U2hkfvbMNLftTYn+6AxStBj52pMey3Ocdmfvp5RqUNoJqr4=
Private-MAC: 200f3733e416932e8f225d7a0a4212514a8a4879
Implemented types

Constructors

PuttyPrivateKey(String keyType, String encryption, Uint8List publicKeyBytes, Uint8List privateKeyBytes, [String? comment])
Default constructor
PuttyPrivateKey.decode(String str, {int offset = 0})
Decode from text

Properties

comment String?
Comment
getter/setter pair
encryption String
Encryption method
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keyType String
Key-type
getter/setter pair
privateKeyBytes Uint8List
Bytes in the private key lines
getter/setter pair
publicKeyBytes Uint8List
Bytes in the public key lines
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source PvtTextSource?
Source text this PKK was decoded from
getter/setter pair

Methods

encode(String passphrase) String
Encode into text and encrypt with passphrase
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

puttyKeyTypeTag → const String
First line.