Table of Contents

Class Cipher

Namespace
Javax.Crypto
Assembly
MASES.Netdroid.dll
public class Cipher : JVMBridgeBase<Cipher>, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition
Inheritance
Cipher
Implements
Derived
Extension Methods

Constructors

Cipher(IJVMBridgeBaseInitializer)

Initializer used internally by JCOBridge. Do not use directly.

[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public Cipher(IJVMBridgeBaseInitializer initializer)

Parameters

initializer IJVMBridgeBaseInitializer

Properties

BridgeClassName

Java class name to be instantiated

public override string BridgeClassName { get; }

Property Value

string

DECRYPT_MODE

public static int DECRYPT_MODE { get; set; }

Property Value

int

ENCRYPT_MODE

public static int ENCRYPT_MODE { get; set; }

Property Value

int

IsBridgeAbstract

true if the BridgeClassName is an abstract class, i.e. cannot be created an instance

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

true if the BridgeClassName implements java.lang.AutoCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

true if the BridgeClassName is an interface, i.e. does not have any public constructor

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

true if the BridgeClassName is a static class, i.e. does not have any public constructor

public override bool IsBridgeStatic { get; }

Property Value

bool

PRIVATE_KEY

public static int PRIVATE_KEY { get; set; }

Property Value

int

PUBLIC_KEY

public static int PUBLIC_KEY { get; set; }

Property Value

int

SECRET_KEY

public static int SECRET_KEY { get; set; }

Property Value

int

UNWRAP_MODE

public static int UNWRAP_MODE { get; set; }

Property Value

int

WRAP_MODE

public static int WRAP_MODE { get; set; }

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

GetAlgorithm()

public String GetAlgorithm()

Returns

String

String

GetBlockSize()

public int GetBlockSize()

Returns

int

int

GetExemptionMechanism()

public ExemptionMechanism GetExemptionMechanism()

Returns

ExemptionMechanism

ExemptionMechanism

GetIV()

public byte[] GetIV()

Returns

byte[]

byte

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

GetParameters()

public AlgorithmParameters GetParameters()

Returns

AlgorithmParameters

AlgorithmParameters

GetProvider()

public Provider GetProvider()

Returns

Provider

Provider

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