Class CryptoSessionKey


  • public class CryptoSessionKey
    extends java.lang.Object
    A class for the encryption and decryption of session keys.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    See Also:
    CryptoHash, CryptoData
    • Constructor Summary

      Constructors 
      Constructor Description
      CryptoSessionKey​(java.lang.String key)
      Creates a session key based on the given data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream createDecryptionInputStream​(java.io.InputStream in, int size)  
      java.lang.String decrypt​(java.lang.String iCipherText)
      Decrypts the specified string.
      java.lang.String encrypt​(java.lang.String iPlainText, EnumCipher cipher)  
      java.lang.String encrypt​(java.lang.String iPlainText, java.lang.String serverName, int port)
      Encrypts the specified string.
      byte[] encrypt2Bytes​(java.lang.String iPlainText, EnumCipher cipher)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CryptoSessionKey

        public CryptoSessionKey​(java.lang.String key)
        Creates a session key based on the given data.
        Parameters:
        key - string to be used as key.
    • Method Detail

      • decrypt

        public final java.lang.String decrypt​(java.lang.String iCipherText)
        Decrypts the specified string.
        Parameters:
        iCipherText - String to be decrypted.
        Returns:
        Decrypted string or null if the input string is not valid.
      • encrypt

        public final java.lang.String encrypt​(java.lang.String iPlainText,
                                              java.lang.String serverName,
                                              int port)
        Encrypts the specified string.
        Parameters:
        iPlainText - String to be encrypted.
        Returns:
        Encrypted string.
        Since:
        MicroStrategy Web 9.0.0
      • encrypt

        public final java.lang.String encrypt​(java.lang.String iPlainText,
                                              EnumCipher cipher)
        Since:
        MicroStrategy Web 9.0.0
      • encrypt2Bytes

        public final byte[] encrypt2Bytes​(java.lang.String iPlainText,
                                          EnumCipher cipher)
        Since:
        MicroStrategy Web 9.0.1
      • createDecryptionInputStream

        public final java.io.InputStream createDecryptionInputStream​(java.io.InputStream in,
                                                                     int size)
                                                              throws java.io.IOException,
                                                                     java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
        Since:
        MicroStrategy Web 9.0.1