Table of Contents

Class Cipher

Namespace
Javax.Crypto
Assembly
MASES.JNet.dll
public class Cipher : JVMBridgeBase<Cipher>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
Inheritance
JVMBridgeBase
JVMBridgeBase<Cipher>
Cipher
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IJVMBridgeBase
IJVMBridgeDefinition
Derived
Inherited Members
JVMBridgeBase<Cipher>.IsAssignableFrom(IJavaType)
JVMBridgeBase<Cipher>.IsAssignableFrom<T>()
JVMBridgeBase<Cipher>.Execute<T>(params T[])
JVMBridgeBase<Cipher>.DynBridgeClazz
JVMBridgeBase<Cipher>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.Dispose()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeListener
Extension Methods

Constructors

Cipher()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public Cipher()

Cipher(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

public Cipher(params object[] args)

Parameters

args object[]

Properties

Algorithm

public String Algorithm { get; }

Property Value

String

BlockSize

public int BlockSize { get; }

Property Value

int

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

DECRYPT_MODE

public static int DECRYPT_MODE { get; }

Property Value

int

ENCRYPT_MODE

public static int ENCRYPT_MODE { get; }

Property Value

int

ExemptionMechanism

public ExemptionMechanism ExemptionMechanism { get; }

Property Value

ExemptionMechanism

IV

public byte[] IV { get; }

Property Value

byte[]

IsBridgeAbstract

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

public override bool IsBridgeStatic { get; }

Property Value

bool

PRIVATE_KEY

public static int PRIVATE_KEY { get; }

Property Value

int

PUBLIC_KEY

public static int PUBLIC_KEY { get; }

Property Value

int

Parameters

public AlgorithmParameters Parameters { get; }

Property Value

AlgorithmParameters

Provider

public Provider Provider { get; }

Property Value

Provider

SECRET_KEY

public static int SECRET_KEY { get; }

Property Value

int

UNWRAP_MODE

public static int UNWRAP_MODE { get; }

Property Value

int

WRAP_MODE

public static int WRAP_MODE { get; }

Property Value

int

Methods

DoFinal()

public byte[] DoFinal()

Returns

byte[]

byte

Exceptions

IllegalBlockSizeException
BadPaddingException

DoFinal(ByteBuffer, ByteBuffer)

public int DoFinal(ByteBuffer arg0, ByteBuffer arg1)

Parameters

arg0 ByteBuffer

ByteBuffer

arg1 ByteBuffer

ByteBuffer

Returns

int

int

Exceptions

ShortBufferException
IllegalBlockSizeException
BadPaddingException

DoFinal(byte[])

public byte[] DoFinal(byte[] arg0)

Parameters

arg0 byte[]

byte

Returns

byte[]

byte

Exceptions

IllegalBlockSizeException
BadPaddingException

DoFinal(byte[], int)

public int DoFinal(byte[] arg0, int arg1)

Parameters

arg0 byte[]

byte

arg1 int

int

Returns

int

int

Exceptions

IllegalBlockSizeException
ShortBufferException
BadPaddingException

DoFinal(byte[], int, int)

public byte[] DoFinal(byte[] arg0, int arg1, int arg2)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

Returns

byte[]

byte

Exceptions

IllegalBlockSizeException
BadPaddingException

DoFinal(byte[], int, int, byte[])

public int DoFinal(byte[] arg0, int arg1, int arg2, byte[] arg3)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

arg3 byte[]

byte

Returns

int

int

Exceptions

ShortBufferException
IllegalBlockSizeException
BadPaddingException

DoFinal(byte[], int, int, byte[], int)

public int DoFinal(byte[] arg0, int arg1, int arg2, byte[] arg3, int arg4)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

arg3 byte[]

byte

arg4 int

int

Returns

int

int

Exceptions

ShortBufferException
IllegalBlockSizeException
BadPaddingException

GetInstance(String)

public static Cipher GetInstance(String arg0)

Parameters

arg0 String

String

Returns

Cipher

Cipher

Exceptions

NoSuchAlgorithmException
NoSuchPaddingException

GetInstance(String, String)

public static Cipher GetInstance(String arg0, String arg1)

Parameters

arg0 String

String

arg1 String

String

Returns

Cipher

Cipher

Exceptions

NoSuchAlgorithmException
NoSuchProviderException
NoSuchPaddingException

GetInstance(String, Provider)

public static Cipher GetInstance(String arg0, Provider arg1)

Parameters

arg0 String

String

arg1 Provider

Provider

Returns

Cipher

Cipher

Exceptions

NoSuchAlgorithmException
NoSuchPaddingException

GetMaxAllowedKeyLength(String)

public static int GetMaxAllowedKeyLength(String arg0)

Parameters

arg0 String

String

Returns

int

int

Exceptions

NoSuchAlgorithmException

GetMaxAllowedParameterSpec(String)

public static AlgorithmParameterSpec GetMaxAllowedParameterSpec(String arg0)

Parameters

arg0 String

String

Returns

AlgorithmParameterSpec

AlgorithmParameterSpec

Exceptions

NoSuchAlgorithmException

GetOutputSize(int)

public int GetOutputSize(int arg0)

Parameters

arg0 int

int

Returns

int

int

Init(int, Certificate)

public void Init(int arg0, Certificate arg1)

Parameters

arg0 int

int

arg1 Certificate

Certificate

Exceptions

InvalidKeyException

Init(int, Certificate, SecureRandom)

public void Init(int arg0, Certificate arg1, SecureRandom arg2)

Parameters

arg0 int

int

arg1 Certificate

Certificate

arg2 SecureRandom

SecureRandom

Exceptions

InvalidKeyException

Init(int, Key)

public void Init(int arg0, Key arg1)

Parameters

arg0 int

int

arg1 Key

Key

Exceptions

InvalidKeyException

Init(int, Key, AlgorithmParameters)

public void Init(int arg0, Key arg1, AlgorithmParameters arg2)

Parameters

arg0 int

int

arg1 Key

Key

arg2 AlgorithmParameters

AlgorithmParameters

Exceptions

InvalidKeyException
InvalidAlgorithmParameterException

Init(int, Key, AlgorithmParameters, SecureRandom)

public void Init(int arg0, Key arg1, AlgorithmParameters arg2, SecureRandom arg3)

Parameters

arg0 int

int

arg1 Key

Key

arg2 AlgorithmParameters

AlgorithmParameters

arg3 SecureRandom

SecureRandom

Exceptions

InvalidKeyException
InvalidAlgorithmParameterException

Init(int, Key, SecureRandom)

public void Init(int arg0, Key arg1, SecureRandom arg2)

Parameters

arg0 int

int

arg1 Key

Key

arg2 SecureRandom

SecureRandom

Exceptions

InvalidKeyException

Init(int, Key, AlgorithmParameterSpec)

public void Init(int arg0, Key arg1, AlgorithmParameterSpec arg2)

Parameters

arg0 int

int

arg1 Key

Key

arg2 AlgorithmParameterSpec

AlgorithmParameterSpec

Exceptions

InvalidKeyException
InvalidAlgorithmParameterException

Init(int, Key, AlgorithmParameterSpec, SecureRandom)

public void Init(int arg0, Key arg1, AlgorithmParameterSpec arg2, SecureRandom arg3)

Parameters

arg0 int

int

arg1 Key

Key

arg2 AlgorithmParameterSpec

AlgorithmParameterSpec

arg3 SecureRandom

SecureRandom

Exceptions

InvalidKeyException
InvalidAlgorithmParameterException

Unwrap(byte[], String, int)

public Key Unwrap(byte[] arg0, String arg1, int arg2)

Parameters

arg0 byte[]

byte

arg1 String

String

arg2 int

int

Returns

Key

Key

Exceptions

InvalidKeyException
NoSuchAlgorithmException

Update(ByteBuffer, ByteBuffer)

public int Update(ByteBuffer arg0, ByteBuffer arg1)

Parameters

arg0 ByteBuffer

ByteBuffer

arg1 ByteBuffer

ByteBuffer

Returns

int

int

Exceptions

ShortBufferException

Update(byte[])

public byte[] Update(byte[] arg0)

Parameters

arg0 byte[]

byte

Returns

byte[]

byte

Update(byte[], int, int)

public byte[] Update(byte[] arg0, int arg1, int arg2)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

Returns

byte[]

byte

Update(byte[], int, int, byte[])

public int Update(byte[] arg0, int arg1, int arg2, byte[] arg3)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

arg3 byte[]

byte

Returns

int

int

Exceptions

ShortBufferException

Update(byte[], int, int, byte[], int)

public int Update(byte[] arg0, int arg1, int arg2, byte[] arg3, int arg4)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

arg3 byte[]

byte

arg4 int

int

Returns

int

int

Exceptions

ShortBufferException

UpdateAAD(ByteBuffer)

public void UpdateAAD(ByteBuffer arg0)

Parameters

arg0 ByteBuffer

ByteBuffer

UpdateAAD(byte[])

public void UpdateAAD(byte[] arg0)

Parameters

arg0 byte[]

byte

UpdateAAD(byte[], int, int)

public void UpdateAAD(byte[] arg0, int arg1, int arg2)

Parameters

arg0 byte[]

byte

arg1 int

int

arg2 int

int

Wrap(Key)

public byte[] Wrap(Key arg0)

Parameters

arg0 Key

Key

Returns

byte[]

byte

Exceptions

IllegalBlockSizeException
InvalidKeyException