|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openswing.swing.permissions.java.CryptUtils
Title: OpenSwing Framework
Description: Utility class used to crypt and decrypt of bytes. This class can be used by LoginDialog class to encode/decode the password field. This class can be used by any other layer: there are two initializers, based on "getInstance" method; - getInstance() initializes the internal cipher by providing a default internal password - getInstance(String passwd) initializes the internal cipher by providing an application defined password
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Method Summary | |
byte[] |
decodeBytes(byte[] encodedBytes)
|
java.lang.String |
decodeText(byte[] encodedBytes)
|
byte[] |
encodeBytes(byte[] clearBytes)
|
byte[] |
encodeText(java.lang.String clearText)
|
static CryptUtils |
getInstance()
|
static CryptUtils |
getInstance(java.lang.String passwd)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static CryptUtils getInstance()
public static CryptUtils getInstance(java.lang.String passwd)
passwd
- password used to initialize the encryption/decryption cipher
public final byte[] encodeBytes(byte[] clearBytes) throws java.lang.Throwable
clearBytes
- bytes to encode
java.lang.Throwable
public final byte[] decodeBytes(byte[] encodedBytes) throws java.lang.Throwable
encodedBytes
- bytes to decode
java.lang.Throwable
public final byte[] encodeText(java.lang.String clearText) throws java.lang.Throwable
clearText
- text to encode
java.lang.Throwable
public final java.lang.String decodeText(byte[] encodedBytes) throws java.lang.Throwable
encodedBytes
- bytes to decode as text
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |