|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mayo.bsi.ngsportal.shared.Encryptor
public class Encryptor
@author Gregory Dougherty
| Constructor Summary | |
|---|---|
Encryptor(byte[] flipper,
int rotateBits)
Create an encryptor / decryptor for this session |
|
| Method Summary | |
|---|---|
String |
convertByteStringToPassword(String byteString)
Javascript apparently can't handle the non-utf8 strings that encoding creates, so on the client side we return a string of bytes (as integers) separated by "\t", and on the server side we decode that format |
String |
convertPassword(byte[] pwdBytes,
boolean encoding)
Convert password call to make when you have a byte string |
String |
convertPassword(String password,
boolean encoding)
Passing passwords as plain text is exceedingly poor security. |
String |
convertPasswordToByteString(String password)
Javascript apparently can't handle the non-utf8 strings that this creates, so on the client side we return a string of bytes (as integers) separated by "\t" |
byte[] |
getFlipper()
|
byte[] |
getFlipperBuild()
Return bytes that can be used by Encryptor(byte[], int) to create a new
matching Encryptor. |
int |
getRotateBits()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Encryptor(byte[] flipper,
int rotateBits)
flipper - The bytes to xor withrotateBits - How many bits to rotate| Method Detail |
|---|
public final byte[] getFlipper()
public final byte[] getFlipperBuild()
Encryptor(byte[], int) to create a new
matching Encryptor.
public final int getRotateBits()
public final String convertPassword(String password,
boolean encoding)
password - the string that needs to either be encoded or decodedencoding - True if encoding the password, false if decoding the password
public final String convertPassword(byte[] pwdBytes,
boolean encoding)
pwdBytes - The bytes that would be turned into a stringencoding - If true then encoding the string, else decoding
public final String convertPasswordToByteString(String password)
password - the string that needs to be encoded
public final String convertByteStringToPassword(String byteString)
byteString - A string of numbers separated by tabs that needs to be decoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||