- Ident in spaces

This commit is contained in:
Iger
2017-06-25 11:40:19 +03:00
committed by Jeroen van Erp
parent 3310530d42
commit 6ad6242ed1
3 changed files with 79 additions and 80 deletions

View File

@@ -30,12 +30,10 @@ import net.schmizz.sshj.common.KeyType;
import net.schmizz.sshj.common.SSHRuntimeException; import net.schmizz.sshj.common.SSHRuntimeException;
/** ECDSA {@link Signature} */ /** ECDSA {@link Signature} */
public class SignatureECDSA public class SignatureECDSA extends AbstractSignature {
extends AbstractSignature {
/** A named factory for ECDSA-256 signature */ /** A named factory for ECDSA-256 signature */
public static class Factory256 public static class Factory256 implements net.schmizz.sshj.common.Factory.Named<Signature> {
implements net.schmizz.sshj.common.Factory.Named<Signature> {
@Override @Override
public Signature create() { public Signature create() {
@@ -50,8 +48,7 @@ public class SignatureECDSA
} }
/** A named factory for ECDSA-384 signature */ /** A named factory for ECDSA-384 signature */
public static class Factory384 public static class Factory384 implements net.schmizz.sshj.common.Factory.Named<Signature> {
implements net.schmizz.sshj.common.Factory.Named<Signature> {
@Override @Override
public Signature create() { public Signature create() {
@@ -66,8 +63,7 @@ public class SignatureECDSA
} }
/** A named factory for ECDSA-521 signature */ /** A named factory for ECDSA-521 signature */
public static class Factory521 public static class Factory521 implements net.schmizz.sshj.common.Factory.Named<Signature> {
implements net.schmizz.sshj.common.Factory.Named<Signature> {
@Override @Override
public Signature create() { public Signature create() {
@@ -143,7 +139,10 @@ public class SignatureECDSA
int rLen = r.length; int rLen = r.length;
int sLen = s.length; int sLen = s.length;
/* We can't have the high bit set, so add an extra zero at the beginning if so. */ /*
* We can't have the high bit set, so add an extra zero at the beginning
* if so.
*/
if ((r[0] & 0x80) != 0) { if ((r[0] & 0x80) != 0) {
rLen++; rLen++;
} }