|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FreeTest.AuthSys
The AuthSys Class implements a Message Authentication Code system (MAC).
AuthSys creates its MAC based on the SHA-1 algorithm included as part of
java.security
which comes with all Java implementations and
is not subject to restrictions. Essentially a message digest of a packet's
data portion is created. Then a new message digest of the previous digest
concatenated with a passphrase is created. This is returned to be added to
packets elsewhere.
Constructor Summary | |
AuthSys()
|
Method Summary | |
static boolean |
checkDigest(Packet pack)
analyses MAC to ensure packets haven't been tampered. |
static java.lang.String |
makeDigest(java.lang.String data)
creates a MAC to detect tampering |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public AuthSys()
Method Detail |
public static java.lang.String makeDigest(java.lang.String data) throws java.lang.Exception
data
- The data being sent in the packetpublic static boolean checkDigest(Packet pack) throws java.lang.Exception
makeDigest
and compares the result with
the digest portion of the Packet
supplied.pack
- The packet, including message digest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |