Class McElieceKobaraImaiCipherSpi

    • Constructor Detail

      • McElieceKobaraImaiCipherSpi

        public McElieceKobaraImaiCipherSpi()
    • Method Detail

      • update

        public byte[] update​(byte[] input,
                             int inOff,
                             int inLen)
        Continue a multiple-part encryption or decryption operation.
        Specified by:
        update in class AsymmetricHybridCipher
        Parameters:
        input - byte array containing the next part of the input
        inOff - index in the array where the input starts
        inLen - length of the input
        Returns:
        the processed byte array.
      • doFinal

        public byte[] doFinal​(byte[] input,
                              int inOff,
                              int inLen)
                       throws BadPaddingException
        Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized.
        Specified by:
        doFinal in class AsymmetricHybridCipher
        Parameters:
        input - the input buffer
        inOff - the offset in input where the input starts
        inLen - the input length
        Returns:
        the new buffer with the result
        Throws:
        BadPaddingException - if this cipher is in decryption mode, and (un)padding has been requested, but the decrypted data is not bounded by the appropriate padding bytes
      • encryptOutputSize

        protected int encryptOutputSize​(int inLen)
        Description copied from class: AsymmetricHybridCipher
        Compute the output size of an update() or doFinal() operation of a hybrid asymmetric cipher in encryption mode when given input of the specified length.
        Specified by:
        encryptOutputSize in class AsymmetricHybridCipher
        Parameters:
        inLen - the length of the input
        Returns:
        the output size
      • decryptOutputSize

        protected int decryptOutputSize​(int inLen)
        Description copied from class: AsymmetricHybridCipher
        Compute the output size of an update() or doFinal() operation of a hybrid asymmetric cipher in decryption mode when given input of the specified length.
        Specified by:
        decryptOutputSize in class AsymmetricHybridCipher
        Parameters:
        inLen - the length of the input
        Returns:
        the output size