directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r153000 - incubator/directory/protocols/kerberos/trunk/core/src/java/org/apache/kerberos/messages/value/Checksum.java
Date Wed, 09 Feb 2005 04:41:12 GMT
Author: erodriguez
Date: Tue Feb  8 20:41:11 2005
New Revision: 153000

URL: http://svn.apache.org/viewcvs?view=rev&rev=153000
Log:
Reformatted the Checksum class.

Modified:
    incubator/directory/protocols/kerberos/trunk/core/src/java/org/apache/kerberos/messages/value/Checksum.java

Modified: incubator/directory/protocols/kerberos/trunk/core/src/java/org/apache/kerberos/messages/value/Checksum.java
URL: http://svn.apache.org/viewcvs/incubator/directory/protocols/kerberos/trunk/core/src/java/org/apache/kerberos/messages/value/Checksum.java?view=diff&r1=152999&r2=153000
==============================================================================
--- incubator/directory/protocols/kerberos/trunk/core/src/java/org/apache/kerberos/messages/value/Checksum.java
(original)
+++ incubator/directory/protocols/kerberos/trunk/core/src/java/org/apache/kerberos/messages/value/Checksum.java
Tue Feb  8 20:41:11 2005
@@ -14,38 +14,53 @@
  *   limitations under the License.
  *
  */
+
 package org.apache.kerberos.messages.value;
 
-import org.apache.kerberos.crypto.checksum.*;
+import java.util.Arrays;
 
-import java.util.*;
+import org.apache.kerberos.crypto.checksum.ChecksumType;
 
-public class Checksum {
 
-	private ChecksumType _checksumType;
-	private byte[] _checksum;
+public class Checksum
+{
+	private ChecksumType checksumType;
+	private byte[]       checksum;
+	
 	
-	public Checksum(ChecksumType cksumType, byte[] checksum) {
-		_checksumType = cksumType;
-		_checksum     = checksum;
+	public Checksum( ChecksumType checksumType, byte[] checksum )
+	{
+		this.checksumType = checksumType;
+		this.checksum     = checksum;
 	}
 	
-	public boolean equals(Object o) {
-		if (this == o)
+	
+	public boolean equals( Object o )
+	{
+		if ( this == o )
+		{
 			return true;
-		if (!(o instanceof Checksum))
+		}
+		
+		if ( !( o instanceof Checksum ) )
+		{
 			return false;
-
+		}
+		
 		Checksum that = (Checksum) o;
-		return (this._checksumType == that._checksumType)
-				&& (Arrays.equals(this._checksum, that._checksum));
+		
+		return ( this.checksumType == that.checksumType )
+				&& ( Arrays.equals( this.checksum, that.checksum ) );
 	}
 	
-	public byte[] getChecksumValue() {
-		return _checksum;
+	public byte[] getChecksumValue()
+	{
+		return checksum;
 	}
-	public ChecksumType getChecksumType() {
-		return _checksumType;
+	
+	public ChecksumType getChecksumType()
+	{
+		return checksumType;
 	}
 }
 



Mime
View raw message