Deprecate Signature.FAKE_SIGNATURE

This commit is contained in:
zzz
2013-11-23 14:33:58 +00:00
parent 143a0dfc47
commit 74f2fd06cc
2 changed files with 10 additions and 5 deletions

View File

@@ -10,6 +10,9 @@ import net.i2p.data.SigningPublicKey;
*
*/
public class DummyDSAEngine extends DSAEngine {
private static final Signature FAKE_SIGNATURE = new Signature(new byte[Signature.SIGNATURE_BYTES]);
public DummyDSAEngine(I2PAppContext context) {
super(context);
}
@@ -21,8 +24,6 @@ public class DummyDSAEngine extends DSAEngine {
@Override
public Signature sign(byte data[], SigningPrivateKey signingKey) {
Signature sig = new Signature();
sig.setData(Signature.FAKE_SIGNATURE);
return sig;
return FAKE_SIGNATURE;
}
}

View File

@@ -25,7 +25,11 @@ public class Signature extends SimpleDataStructure {
private static final SigType DEF_TYPE = SigType.DSA_SHA1;
/** 40 */
public final static int SIGNATURE_BYTES = DEF_TYPE.getSigLen();
/** all zeros */
/**
* all zeros
* @deprecated to be removed
*/
public final static byte[] FAKE_SIGNATURE = new byte[SIGNATURE_BYTES];
private final SigType _type;