Interface CipherSpecifications

  • All Known Subinterfaces:
    CipherFactory

    public interface CipherSpecifications
    Common specifications for cipher factories.
    Since:
    5.4M1
    Version:
    $Id: 98a19f0783e47de542ea67f1f69a8cd8395adff3 $
    • Method Detail

      • getCipherAlgorithmName

        String getCipherAlgorithmName()
        Returns:
        the algorithm name of created ciphers (ie: AES, CAST5, ...)
      • getIVSize

        int getIVSize()
        Returns:
        the cipher block size (in bytes) that should be used to generate an IV or -1 if the cipher does not use an initialization vector.
      • getKeySize

        int getKeySize()
        Returns:
        the recommended default key size of created ciphers (in bytes), usually the largest one supported.
      • getSupportedKeySizes

        int[] getSupportedKeySizes()
        Returns:
        an array of the supported key sizes of created ciphers (in bytes).
      • isSupportedKeySize

        boolean isSupportedKeySize​(int keySize)
        Parameters:
        keySize - the size in bytes of a proposed key.
        Returns:
        true if the proposed key size is supported.