public class

EncryptionUtil

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.EncryptionUtil

Class Overview

Utility class for Encryption

Summary

Fields
public static String MD5_ALGORITHM
public static String SHA1_ALGORITHM
Public Constructors
EncryptionUtil()
Public Methods
static byte[] decrypt(String base64EncryptedStringValue, String key)
@return
static String decryptToString(String base64EncryptedStringValue, String key)
@return
static byte[] encrypt(String dataToEncrypt, String key)
Encrypts the given data@return
static String encryptToBase64String(String dataToEncrypt, String key)
Encrypts and returns base64 encoded String@return
static String printHexBinary(byte[] data)
Converts byte[] to hex String Copy of javax.xml.bind.DatatypeConverter (Lower case letter though)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static String MD5_ALGORITHM

public static String SHA1_ALGORITHM

Public Constructors

public EncryptionUtil ()

Public Methods

public static byte[] decrypt (String base64EncryptedStringValue, String key)

@return

Parameters
base64EncryptedStringValue Previously Encrypted base64EncodedString
Throws
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
IllegalBlockSizeException
InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException

public static String decryptToString (String base64EncryptedStringValue, String key)

@return

Parameters
base64EncryptedStringValue Previously Encrypted base64EncodedString
Throws
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
IllegalBlockSizeException
InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException

public static byte[] encrypt (String dataToEncrypt, String key)

Encrypts the given data@return

Throws
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
IllegalBlockSizeException
InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException

public static String encryptToBase64String (String dataToEncrypt, String key)

Encrypts and returns base64 encoded String@return

Throws
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
IllegalBlockSizeException
InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException

public static String printHexBinary (byte[] data)

Converts byte[] to hex String Copy of javax.xml.bind.DatatypeConverter (Lower case letter though)