Changeset 563e1f9


Ignore:
Timestamp:
Dec 29, 2010 2:07:13 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8a4745a
Parents:
fc589db
Message:
  • DSAEngine: Restore variants of methods using a Hash argument,

required by Syndie, removed in 0.8.1

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/crypto/DSAEngine.java

    rfc589db r563e1f9  
    3939import net.i2p.data.SigningPrivateKey;
    4040import net.i2p.data.SigningPublicKey;
     41import net.i2p.data.SimpleDataStructure;
    4142import net.i2p.util.Log;
    4243import net.i2p.util.NativeBigInteger;
     
    4445/**
    4546 *  Params and rv's changed from Hash to SHA1Hash for version 0.8.1
    46  *  There shouldn't be any external users of those variants.
     47 *  Hash variants of sign() and verifySignature() restored in 0.8.3, required by Syndie.
    4748 */
    4849public class DSAEngine {
     
    6970    /** @param hash SHA-1 hash, NOT a SHA-256 hash */
    7071    public boolean verifySignature(Signature signature, SHA1Hash hash, SigningPublicKey verifyingKey) {
     72        return verifySig(signature, hash, verifyingKey);
     73    }
     74
     75    /**
     76     *  Used by Syndie.
     77     *  @since 0.8.3 (restored, was removed in 0.8.1 and 0.8.2)
     78     */
     79    public boolean verifySignature(Signature signature, Hash hash, SigningPublicKey verifyingKey) {
     80        return verifySig(signature, hash, verifyingKey);
     81    }
     82
     83    /**
     84     *  @param hash either a Hash or a SHA1Hash
     85     *  @since 0.8.3
     86     */
     87    private boolean verifySig(Signature signature, SimpleDataStructure hash, SigningPublicKey verifyingKey) {
    7188        long start = _context.clock().now();
    7289
     
    130147    /** @param hash SHA-1 hash, NOT a SHA-256 hash */
    131148    public Signature sign(SHA1Hash hash, SigningPrivateKey signingKey) {
     149        return signIt(hash, signingKey);
     150    }
     151
     152    /**
     153     *  Used by Syndie.
     154     *  @since 0.8.3 (restored, was removed in 0.8.1 and 0.8.2)
     155     */
     156    public Signature sign(Hash hash, SigningPrivateKey signingKey) {
     157        return signIt(hash, signingKey);
     158    }
     159
     160    /**
     161     *  @param hash either a Hash or a SHA1Hash
     162     *  @since 0.8.3
     163     */
     164    private Signature signIt(SimpleDataStructure hash, SigningPrivateKey signingKey) {
    132165        if ((signingKey == null) || (hash == null)) return null;
    133166        long start = _context.clock().now();
  • history.txt

    rfc589db r563e1f9  
    112010-12-29 zzz
    22    * Console: Add 500 error page
     3    * DSAEngine: Restore variants of methods using a Hash argument,
     4                 required by Syndie, removed in 0.8.1
    35    * Reseed:
    46      - Add new configreseed page
  • router/java/src/net/i2p/router/RouterVersion.java

    rfc589db r563e1f9  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 3;
     21    public final static long BUILD = 4;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.