/[classpath]/classpath/gnu/java/security/der/BitString.java
ViewVC logotype

Diff of /classpath/gnu/java/security/der/BitString.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.2 by gnu_andrew, Tue Aug 2 20:12:12 2005 UTC revision 1.1.2.3 by gnu_andrew, Wed Nov 2 00:43:28 2005 UTC
# Line 286  public class BitString implements Clonea Line 286  public class BitString implements Clonea
286      return 0; // not reached.      return 0; // not reached.
287    }    }
288    
289      public int hashCode()
290      {
291        int result = 0;
292        for (int i = 0; i < bytes.length - 1; ++i)
293          result = result * 31 + bytes[i];
294        if (bytes.length > 0)
295          {
296            int lastByte = bytes[bytes.length - 1] & ~ ((1 << ignoredBits) - 1);
297            result = result * 31 + lastByte;
298          }
299        return result;
300      }
301    
302    public boolean equals(Object o)    public boolean equals(Object o)
303    {    {
304      if (!(o instanceof BitString))      if (!(o instanceof BitString))

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26