Class SP80038FWrapWithPaddingEngine

    • Constructor Summary

      Constructors 
      Constructor Description
      SP80038FWrapWithPaddingEngine​(BlockCipher engine, boolean useReverseDirection)
      Create a RFC 3394 WrapEngine specifying the direction for wrapping and unwrapping..
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithmName()
      Return the name of the algorithm the wrapper implements.
      void init​(boolean forWrapping, CipherParameters param)  
      protected void invW​(int n, byte[] block, byte[] a)  
      byte[] unwrap​(byte[] in, int inOff, int inLen)  
      protected byte[] W​(int n, byte[] block)  
      byte[] wrap​(byte[] in, int inOff, int inLen)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ivKW

        protected static final byte[] ivKW
      • ivKWP

        protected static final byte[] ivKWP
      • wrapCipherMode

        protected final boolean wrapCipherMode
      • delta

        protected final int delta
      • iv

        protected final byte[] iv
      • forWrapping

        protected boolean forWrapping
    • Constructor Detail

      • SP80038FWrapWithPaddingEngine

        public SP80038FWrapWithPaddingEngine​(BlockCipher engine,
                                             boolean useReverseDirection)
        Create a RFC 3394 WrapEngine specifying the direction for wrapping and unwrapping..
        Parameters:
        engine - the block cipher to be used for wrapping.
        useReverseDirection - true if engine should be used in decryption mode for wrapping, false otherwise.
    • Method Detail

      • getAlgorithmName

        public java.lang.String getAlgorithmName()
        Description copied from interface: Wrapper
        Return the name of the algorithm the wrapper implements.
        Returns:
        the name of the algorithm the wrapper implements.
      • wrap

        public byte[] wrap​(byte[] in,
                           int inOff,
                           int inLen)
      • W

        protected byte[] W​(int n,
                           byte[] block)
      • invW

        protected void invW​(int n,
                            byte[] block,
                            byte[] a)