public class

DESedeWrapEngine

extends Object
implements Wrapper
java.lang.Object
   ↳ org.bouncycastle.crypto.engines.DESedeWrapEngine

Class Overview

Wrap keys according to draft-ietf-smime-key-wrap-01.txt.

Note:

  • this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
  • if you are using this to wrap triple-des keys you need to set the parity bits on the key and, if it's a two-key triple-des key, pad it yourself.

Summary

Public Constructors
DESedeWrapEngine()
Public Methods
String getAlgorithmName()
Method getAlgorithmName
void init(boolean forWrapping, CipherParameters param)
Method init
byte[] unwrap(byte[] in, int inOff, int inLen)
Method unwrap
byte[] wrap(byte[] in, int inOff, int inLen)
Method wrap
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.bouncycastle.crypto.Wrapper

Public Constructors

public DESedeWrapEngine ()

Public Methods

public String getAlgorithmName ()

Method getAlgorithmName

Returns
  • the algorithm name "DESede".

public void init (boolean forWrapping, CipherParameters param)

Method init

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

Method unwrap

Returns
  • the unwrapped bytes.

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

Method wrap

Returns
  • the wrapped bytes.