File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/Renci.SshNet/Security Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public override BigInteger[] Public
3333 {
3434 get
3535 {
36- return new BigInteger [ ] { publicKey . ToBigInteger ( ) } ;
36+ return new BigInteger [ ] { publicKey . ToBigInteger2 ( ) } ;
3737 }
3838 set
3939 {
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
22using Renci . SshNet . Common ;
3+ using Renci . SshNet . Security . Chaos . NaCl ;
34
45namespace Renci . SshNet . Security
56{
@@ -101,7 +102,11 @@ private set
101102 _keys = new List < byte [ ] > ( value . Length ) ;
102103 foreach ( var key in value )
103104 {
104- _keys . Add ( key . ToByteArray ( ) . Reverse ( ) ) ;
105+ var keyData = key . ToByteArray ( ) . Reverse ( ) ;
106+ if ( Name == "ssh-ed25519" )
107+ keyData = keyData . TrimLeadingZeros ( ) . Pad ( Ed25519 . PublicKeySizeInBytes ) ;
108+
109+ _keys . Add ( keyData ) ;
105110 }
106111 }
107112 }
You can’t perform that action at this time.
0 commit comments