mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
- Ident in spaces
This commit is contained in:
@@ -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++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user