|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.common.rolemap.EncryptRoleMapperFile
Stand-alone utility for converting a rolemapper file compatible with the SimpleFileRoleMapper rolemapping implementation into one compatible with the SimpleFileWithEncryptedPasswordsRoleMapper rolemapping implementation.
| Constructor Summary | |
EncryptRoleMapperFile(java.lang.String password,
java.lang.String filename)
Initialisation. |
|
| Method Summary | |
java.lang.String |
encrypt()
Change all instances of a password field in the file's
contents into an encryptedPassword field, containing the
encrypted version of the original value, and return a string
with all the changes in place. |
static void |
main(java.lang.String[] args)
Perform the encryption of the passwords in the file. |
void |
writeToFile(java.lang.String contents)
Delete the file pointed to by mFilename and replace it
with a fresh file containing the value of contents. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EncryptRoleMapperFile(java.lang.String password,
java.lang.String filename)
password - the password to use as the encryption keyfilename - the path to the rolemapper file| Method Detail |
public static void main(java.lang.String[] args)
throws CommonException
args - An array of 2 String objects - args[0]: the password to use as the
encryption key. args[1]: the path to the rolemapper file/
CommonException - if there's a problem encrypting the file
public void writeToFile(java.lang.String contents)
throws CommonException
mFilename and replace it
with a fresh file containing the value of contents.
contents - the string to overwrite the file with
CommonException - if there's a problem overwriting the file
public java.lang.String encrypt()
throws CommonException
password field in the file's
contents into an encryptedPassword field, containing the
encrypted version of the original value, and return a string
with all the changes in place.
CommonException - if there's a problem
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||