You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes it easier to reason about Key instances in e.g.
DigitalSignature implementations, because we know that the
Key is initialised with its data and will not change.
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
{"ssh-ed25519", data =>newKeyHostAlgorithm("ssh-ed25519",newED25519Key(),data)},
400
-
{"ecdsa-sha2-nistp256", data =>newKeyHostAlgorithm("ecdsa-sha2-nistp256",newEcdsaKey(),data)},
401
-
{"ecdsa-sha2-nistp384", data =>newKeyHostAlgorithm("ecdsa-sha2-nistp384",newEcdsaKey(),data)},
402
-
{"ecdsa-sha2-nistp521", data =>newKeyHostAlgorithm("ecdsa-sha2-nistp521",newEcdsaKey(),data)},
399
+
{"ssh-ed25519", data =>newKeyHostAlgorithm("ssh-ed25519",newED25519Key(newSshKeyData(data)))},
400
+
{"ecdsa-sha2-nistp256", data =>newKeyHostAlgorithm("ecdsa-sha2-nistp256",newEcdsaKey(newSshKeyData(data)))},
401
+
{"ecdsa-sha2-nistp384", data =>newKeyHostAlgorithm("ecdsa-sha2-nistp384",newEcdsaKey(newSshKeyData(data)))},
402
+
{"ecdsa-sha2-nistp521", data =>newKeyHostAlgorithm("ecdsa-sha2-nistp521",newEcdsaKey(newSshKeyData(data)))},
403
403
#pragma warning disable SA1107// Code should not contain multiple statements on one line
404
-
{"rsa-sha2-512", data =>{varkey=newRsaKey();returnnewKeyHostAlgorithm("rsa-sha2-512",key,data,newRsaDigitalSignature(key,HashAlgorithmName.SHA512));}},
405
-
{"rsa-sha2-256", data =>{varkey=newRsaKey();returnnewKeyHostAlgorithm("rsa-sha2-256",key,data,newRsaDigitalSignature(key,HashAlgorithmName.SHA256));}},
404
+
{"rsa-sha2-512", data =>{varkey=newRsaKey(newSshKeyData(data));returnnewKeyHostAlgorithm("rsa-sha2-512",key,newRsaDigitalSignature(key,HashAlgorithmName.SHA512));}},
405
+
{"rsa-sha2-256", data =>{varkey=newRsaKey(newSshKeyData(data));returnnewKeyHostAlgorithm("rsa-sha2-256",key,newRsaDigitalSignature(key,HashAlgorithmName.SHA256));}},
406
406
#pragma warning restore SA1107// Code should not contain multiple statements on one line
407
-
{"ssh-rsa", data =>newKeyHostAlgorithm("ssh-rsa",newRsaKey(),data)},
408
-
{"ssh-dss", data =>newKeyHostAlgorithm("ssh-dss",newDsaKey(),data)},
407
+
{"ssh-rsa", data =>newKeyHostAlgorithm("ssh-rsa",newRsaKey(newSshKeyData(data)))},
408
+
{"ssh-dss", data =>newKeyHostAlgorithm("ssh-dss",newDsaKey(newSshKeyData(data)))},
0 commit comments