Class AESPrivateKeyObfuscator

    • Constructor Detail

      • AESPrivateKeyObfuscator

        public AESPrivateKeyObfuscator()
    • Method Detail

      • getSupportedKeySizes

        public java.util.List<java.lang.Integer> getSupportedKeySizes()
        Returns:
        A List of the supported key sizes - Note: every call returns a and un-modifiable instance.
      • applyPrivateKeyCipher

        public byte[] applyPrivateKeyCipher​(byte[] bytes,
                                            PrivateKeyEncryptionContext encContext,
                                            boolean encryptIt)
                                     throws java.security.GeneralSecurityException,
                                            java.io.IOException
        Parameters:
        bytes - Original bytes
        encContext - The encryption context
        encryptIt - If true then encrypt the original bytes, otherwise decrypt them
        Returns:
        The result of applying the cipher to the original bytes
        Throws:
        java.security.GeneralSecurityException - If cannot encrypt/decrypt
        java.io.IOException - If malformed input
      • getAvailableKeyLengths

        public static java.util.List<java.lang.Integer> getAvailableKeyLengths()
        Returns:
        A List of Integers holding the available key lengths values (in bits) for the JVM. Note: AES 256 requires special JCE policy extension installation (e.g., for Java 7 see this link)