Class RFC5649WrapEngine

java.lang.Object
org.bouncycastle.pqc.crypto.util.RFC5649WrapEngine
All Implemented Interfaces:
Wrapper

public class RFC5649WrapEngine extends 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 Details

    • RFC5649WrapEngine

      public RFC5649WrapEngine(BlockCipher engine)
  • Method Details

    • init

      public void init(boolean forWrapping, CipherParameters param)
      Specified by:
      init in interface Wrapper
    • getAlgorithmName

      public 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 org.bouncycastle.crypto.InvalidCipherTextException
      Specified by:
      unwrap in interface Wrapper
      Throws:
      org.bouncycastle.crypto.InvalidCipherTextException