huvc.security
Class Algorithm

java.lang.Object
  |
  +--huvc.security.Algorithm

public class Algorithm
extends java.lang.Object


Constructor Summary
Algorithm()
           
 
Method Summary
static byte[] encrypt(java.lang.String str)
          Encrypts a string using the SHA-1 algorithm
static boolean isEqual(byte[] digest1, byte[] digest2)
          Checks to see if two bytes are equal
static void main(java.lang.String[] args)
          test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Algorithm

public Algorithm()
Method Detail

encrypt

public static byte[] encrypt(java.lang.String str)
Encrypts a string using the SHA-1 algorithm
Parameters:
str - - string to be encryted
Returns:
buf encrypted string

isEqual

public static boolean isEqual(byte[] digest1,
                              byte[] digest2)
Checks to see if two bytes are equal
Returns:
true if they are, false otherwise

main

public static void main(java.lang.String[] args)
test