Class EnumCipher


  • public abstract class EnumCipher
    extends java.lang.Object
    This class identifies the encryption cipher used. Each cipher is uniquely identified by its version string, getVersion().
    Since:
    MicroStrategy Web 9.0.0
    • Field Detail

      • VERSION_SIZE

        public static final int VERSION_SIZE
        Size of the version in hex encoded bytes.
        See Also:
        Constant Field Values
      • VERSION_SIZE_BYTES

        public static final int VERSION_SIZE_BYTES
        Since:
        MicroStrategy Web 9.0.1
        See Also:
        Constant Field Values
    • Method Detail

      • getVersion

        public java.lang.String getVersion()
      • getVersionBytes

        public byte[] getVersionBytes()
        Since:
        MicroStrategy Web 9.0.1
      • getEnumCipher

        public static EnumCipher getEnumCipher​(java.lang.String versionPrefixedEncoded)
        Identifies the EnumCipher instance given a version string. Returns AES by default if version string is indeterminate.
        Parameters:
        versionPrefixedEncoded -
        Returns:
        EnumCipher
      • getEnumCipher

        public static EnumCipher getEnumCipher​(byte[] preamble,
                                               int offset)
        Since:
        MicroStrategy Web 9.0.1
      • isSupported

        public abstract boolean isSupported()
        Checks whether this encryption scheme is supported by the Web application. Also see isSupported(String, int) to check support by Intelligence Server.
        Returns:
        whether this encryption scheme is supported by the Web application.
      • isSupported

        public abstract boolean isSupported​(java.lang.String serverName,
                                            int port)
        Parameters:
        serverName - Intelligence Server name
        port - Intelligence Server port
        Returns:
        whether this encryption scheme is supported by the Intelligence Server.
      • getBestSupported

        public static EnumCipher getBestSupported()
        Exercise care when using this method to obtain best encryption cipher as older clients will not be able to decrypt such strings.
        Returns:
        the best supported cipher on the Web server. This may not be supported by the Intelligence Server.
      • getCompatible

        public static EnumCipher getCompatible​(java.lang.String serverName,
                                               int port)
        Even though an Intelligence Server is able to support a given encryption, such as AES, it may still opt to have data stored encrypted in an older format to enable backwards compatibility with older clients.
        Parameters:
        serverName - Intelligence Server name
        port - Intelligence Server port
        Returns:
        compatible cipher that should be used for encrypting data stored in the metadata.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object