it.eng.spagobi.commons.utilities
Class SecurityUtilities

java.lang.Object
  extended by it.eng.spagobi.commons.utilities.SecurityUtilities

public class SecurityUtilities
extends java.lang.Object

Contains some SpagoBI's security utilities.


Constructor Summary
SecurityUtilities()
           
 
Method Summary
 java.lang.String encodeBase64(byte[] bytes)
          Encode a byte array using Base64 alghoritm.
 byte[] generateRandomChallenge()
          Generate a random array of bytes (1024 bits) using the SHA1PRNG alghoritm.
 java.security.PrivateKey getPrivateKeyDSA()
          Get the SpagoBI Provate Key for a DSA alghoritm.
 byte[] signDSA(byte[] data)
          Sign dsa.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityUtilities

public SecurityUtilities()
Method Detail

getPrivateKeyDSA

public java.security.PrivateKey getPrivateKeyDSA()
Get the SpagoBI Provate Key for a DSA alghoritm.

Returns:
PrivateKey DSA alghoritm for SpagoBI

generateRandomChallenge

public byte[] generateRandomChallenge()
Generate a random array of bytes (1024 bits) using the SHA1PRNG alghoritm.

Returns:
Byte array filled with random byte

encodeBase64

public java.lang.String encodeBase64(byte[] bytes)
Encode a byte array using Base64 alghoritm.

Parameters:
bytes - bytes to encode
Returns:
String Base64 string of the bytes

signDSA

public byte[] signDSA(byte[] data)
Sign dsa.

Parameters:
data - the data
Returns:
the byte[]