Package com.microstrategy.webapi
Class EnumCipher
- java.lang.Object
-
- com.microstrategy.webapi.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 Summary
Fields Modifier and Type Field Description static EnumCipher
AES
static EnumCipher
AES_GCM
static EnumCipher
TEA
static int
VERSION_SIZE
Size of the version in hex encoded bytes.static int
VERSION_SIZE_BYTES
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
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.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.static EnumCipher
getEnumCipher(byte[] preamble, int offset)
static EnumCipher
getEnumCipher(java.lang.String versionPrefixedEncoded)
Identifies theEnumCipher
instance given a version string.java.lang.String
getVersion()
byte[]
getVersionBytes()
int
hashCode()
abstract boolean
isSupported()
Checks whether this encryption scheme is supported by the Web application.abstract boolean
isSupported(java.lang.String serverName, int port)
java.lang.String
toString()
-
-
-
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
-
TEA
public static final EnumCipher TEA
-
AES
public static final EnumCipher AES
-
AES_GCM
public static final EnumCipher AES_GCM
-
-
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 theEnumCipher
instance given a version string. ReturnsAES
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 seeisSupported(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 nameport
- 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 nameport
- 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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-