CryptosignAuthentication class
Constructors
-
CryptosignAuthentication(SigningKey privateKey, String? channelBinding)
-
This is the default constructor that will take an already gathered
privateKey
integer list to initialize the cryptosign authentication method.
-
CryptosignAuthentication.fromBase64(String base64PrivateKey)
-
This method takes a given
base64PrivateKey to make crypto sign
possible. This key needs to generated to be used with the ed25519 algorithm
factory
-
CryptosignAuthentication.fromHex(String? hexPrivateKey)
-
This method takes a given
hexPrivateKey to make crypto sign
possible. This key needs to generated to be used with the ed25519 algorithm
factory
-
CryptosignAuthentication.fromOpenSshPrivateKey(String openSshFileContent, {String? password})
-
This method takes a
openSshFileContent and reads its private key to make
the authentication process possible with crypto sign. The openSshFileContent
must have a ed25519 key file. If the file was password protected, the
optional password will decrypt the private key.
factory
-
CryptosignAuthentication.fromPkcs8PrivateKey(String pkcs8FileContent)
-
This method takes a
pkcs8FileContent and reads its private key to make
the authentication process possible with crypto sign. The
pkcs8FileContent must have a ed25519 key file. If the file was password
protected, you may convert it into a unprotected file first. Password
protection is not supported yet.
factory
-
CryptosignAuthentication.fromPuttyPrivateKey(String ppkFileContent, {String? password})
-
This method takes a
ppkFileContent and reads its private key to make
the authentication process possible with crypto sign. The ppkFileContent
must have a ed25519 key file. If the file was password protected, the
optional password will decrypt the private key.
factory
Properties
-
channelBinding
→ String?
-
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
onChallenge
→ Stream<Extra>
-
When the challenge starts the stream will provide the current Extra in
case the client needs some additional information to challenge the server.
no setteroverride
-
privateKey
→ SigningKey
-
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
challenge()
→ Future<Authenticate>
-
This method is called by the session if the router returns the challenge or
the challenges
extra respectively. This method uses the passed hex
encoded challenge and signs it with the given private key
override
-
getName()
→ String
-
This method is called by the session to identify the authentication name.
override
-
hello(String? realm, Details details)
→ Future<void>
-
This method is called by the session to modify the hello
details for
a given realm. Cryptosign will add a 'pubkey' and a 'channel_binding'
to the authextra
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
hexToBin(String? hexString)
→ Uint8List
-
This method converts a given
hexString to its byte representation.