com.stimulsoft.base.licenses
Class StiCryptHelper

java.lang.Object
  extended by com.stimulsoft.base.licenses.StiCryptHelper

public class StiCryptHelper
extends Object

Copyright Stimulsoft


Constructor Summary
StiCryptHelper()
           
 
Method Summary
static byte[] decrypt(byte[] bytes, String password)
           
static String decrypt(String str, String password)
           
static byte[] encrypt(byte[] bytes, String password)
           
static String encrypt(String str, String password)
           
static String MD5(String value)
           
static String recrypt(String str, String oldPassword, String newPassword)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StiCryptHelper

public StiCryptHelper()
Method Detail

encrypt

public static byte[] encrypt(byte[] bytes,
                             String password)
                      throws InvalidKeyException,
                             InvalidAlgorithmParameterException,
                             NoSuchAlgorithmException,
                             NoSuchProviderException,
                             NoSuchPaddingException,
                             IllegalBlockSizeException,
                             BadPaddingException
Throws:
InvalidKeyException
InvalidAlgorithmParameterException
NoSuchAlgorithmException
NoSuchProviderException
NoSuchPaddingException
IllegalBlockSizeException
BadPaddingException

encrypt

public static String encrypt(String str,
                             String password)
                      throws InvalidKeyException,
                             InvalidAlgorithmParameterException,
                             NoSuchAlgorithmException,
                             NoSuchProviderException,
                             NoSuchPaddingException,
                             IllegalBlockSizeException,
                             BadPaddingException,
                             UnsupportedEncodingException
Throws:
InvalidKeyException
InvalidAlgorithmParameterException
NoSuchAlgorithmException
NoSuchProviderException
NoSuchPaddingException
IllegalBlockSizeException
BadPaddingException
UnsupportedEncodingException

decrypt

public static byte[] decrypt(byte[] bytes,
                             String password)
                      throws InvalidKeyException,
                             InvalidAlgorithmParameterException,
                             IllegalBlockSizeException,
                             BadPaddingException,
                             NoSuchAlgorithmException,
                             NoSuchProviderException,
                             NoSuchPaddingException
Throws:
InvalidKeyException
InvalidAlgorithmParameterException
IllegalBlockSizeException
BadPaddingException
NoSuchAlgorithmException
NoSuchProviderException
NoSuchPaddingException

decrypt

public static String decrypt(String str,
                             String password)
                      throws InvalidKeyException,
                             InvalidAlgorithmParameterException,
                             IllegalBlockSizeException,
                             BadPaddingException,
                             NoSuchAlgorithmException,
                             NoSuchProviderException,
                             NoSuchPaddingException,
                             UnsupportedEncodingException
Throws:
InvalidKeyException
InvalidAlgorithmParameterException
IllegalBlockSizeException
BadPaddingException
NoSuchAlgorithmException
NoSuchProviderException
NoSuchPaddingException
UnsupportedEncodingException

recrypt

public static String recrypt(String str,
                             String oldPassword,
                             String newPassword)
                      throws InvalidKeyException,
                             InvalidAlgorithmParameterException,
                             IllegalBlockSizeException,
                             BadPaddingException,
                             NoSuchAlgorithmException,
                             NoSuchProviderException,
                             NoSuchPaddingException,
                             UnsupportedEncodingException
Throws:
InvalidKeyException
InvalidAlgorithmParameterException
IllegalBlockSizeException
BadPaddingException
NoSuchAlgorithmException
NoSuchProviderException
NoSuchPaddingException
UnsupportedEncodingException

MD5

public static String MD5(String value)
                  throws NoSuchAlgorithmException,
                         UnsupportedEncodingException
Throws:
NoSuchAlgorithmException
UnsupportedEncodingException


Copyright © 2017 Stimulsoft. All Rights Reserved.