RFC5649WrapEngine (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.crypto.engines

## Class RFC5649WrapEngine

- java.lang.Object
- - org.bouncycastle.crypto.engines.RFC5649WrapEngine

- All Implemented Interfaces:
    Wrapper
  Direct Known Subclasses:
    AESWrapPadEngine

      public class RFC5649WrapEngine
      extends java.lang.Object
      implements Wrapper

  An implementation of the AES Key Wrap with Padding specification as described in RFC 5649.

  For details on the specification see: https://tools.ietf.org/html/rfc5649

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RFC5649WrapEngine(BlockCipher engine)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAlgorithmName()` Return the name of the algorithm the wrapper implements.
    `void` | `init(boolean forWrapping, CipherParameters param)`
    `byte[]` | `unwrap(byte[] in, int inOff, int inLen)`
    `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`

- - ### Constructor Detail

    - #### RFC5649WrapEngine

          public RFC5649WrapEngine(BlockCipher engine)

  - ### Method Detail

    - #### init

          public void init(boolean forWrapping,
                  CipherParameters param)

      Specified by:
        `init` in interface `Wrapper`

    - #### getAlgorithmName

          public java.lang.String getAlgorithmName()

      Description copied from interface: `Wrapper`
      Return the name of the algorithm the wrapper implements.
      Specified by:
        `getAlgorithmName` in interface `Wrapper`
      Returns:
        the name of the algorithm the wrapper implements.

    - #### wrap

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

      Specified by:
        `wrap` in interface `Wrapper`

    - #### unwrap

          public byte[] unwrap(byte[] in,
                      int inOff,
                      int inLen)
                        throws InvalidCipherTextException

      Specified by:
        `unwrap` in interface `Wrapper`
      Throws:
        `InvalidCipherTextException`