Package system.security.cryptography
Class SymmetricAlgorithm
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.security.cryptography.SymmetricAlgorithm
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected
public class SymmetricAlgorithm extends NetObject implements java.lang.AutoCloseable
The base .NET class managing System.Security.Cryptography.SymmetricAlgorithm, System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Security.Cryptography.SymmetricAlgorithm
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.StringassemblyShortNameAssembly name: System.Security.Cryptographystatic java.lang.StringclassNameQualified class name: System.Security.Cryptography.SymmetricAlgorithmstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description SymmetricAlgorithm()SymmetricAlgorithm(java.lang.Object instance)Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SymmetricAlgorithmcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoSymmetricAlgorithm, a cast assert is made to check if types are compatible.voidClear()voidclose()static SymmetricAlgorithmCreate()static SymmetricAlgorithmCreate(java.lang.String algName)ICryptoTransformCreateDecryptor()ICryptoTransformCreateDecryptor(byte[] rgbKey, byte[] rgbIV)ICryptoTransformCreateDecryptor(JCORefOut dupParam0, JCORefOut dupParam1)ICryptoTransformCreateEncryptor()ICryptoTransformCreateEncryptor(byte[] rgbKey, byte[] rgbIV)ICryptoTransformCreateEncryptor(JCORefOut dupParam0, JCORefOut dupParam1)byte[]DecryptCbc(byte[] ciphertext, byte[] iv, PaddingMode paddingMode)byte[]DecryptCbc(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2)byte[]DecryptCfb(byte[] ciphertext, byte[] iv, PaddingMode paddingMode, int feedbackSizeInBits)byte[]DecryptCfb(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2, int dupParam3)byte[]DecryptEcb(byte[] ciphertext, PaddingMode paddingMode)byte[]DecryptEcb(JCORefOut dupParam0, PaddingMode dupParam1)voidDispose()byte[]EncryptCbc(byte[] plaintext, byte[] iv, PaddingMode paddingMode)byte[]EncryptCbc(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2)byte[]EncryptCfb(byte[] plaintext, byte[] iv, PaddingMode paddingMode, int feedbackSizeInBits)byte[]EncryptCfb(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2, int dupParam3)byte[]EncryptEcb(byte[] plaintext, PaddingMode paddingMode)byte[]EncryptEcb(JCORefOut dupParam0, PaddingMode dupParam1)voidGenerateIV()voidGenerateKey()intgetBlockSize()intGetCiphertextLengthCbc(int plaintextLength, PaddingMode paddingMode)intGetCiphertextLengthCfb(int plaintextLength, PaddingMode paddingMode, int feedbackSizeInBits)intGetCiphertextLengthEcb(int plaintextLength, PaddingMode paddingMode)intgetFeedbackSize()byte[]getIV()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class Typebyte[]getKey()intgetKeySize()KeySizes[]getLegalBlockSizes()KeySizes[]getLegalKeySizes()CipherModegetMode()PaddingModegetPadding()voidsetBlockSize(int BlockSize)voidsetFeedbackSize(int FeedbackSize)voidsetIV(byte[] IV)voidsetJCOInstance(JCObject instance)voidsetKey(byte[] Key)voidsetKeySize(int KeySize)voidsetMode(CipherMode Mode)voidsetPadding(PaddingMode Padding)booleanValidKeySize(int bitLength)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Security.Cryptography- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Security.Cryptography.SymmetricAlgorithm- See Also:
- Constant Field Values
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static SymmetricAlgorithm cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoSymmetricAlgorithm, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
SymmetricAlgorithminstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
ValidKeySize
public boolean ValidKeySize(int bitLength) throws java.lang.Throwable, PlatformNotSupportedException- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
DecryptCbc
public byte[] DecryptCbc(byte[] ciphertext, byte[] iv, PaddingMode paddingMode) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
DecryptCbc
public byte[] DecryptCbc(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
DecryptCfb
public byte[] DecryptCfb(byte[] ciphertext, byte[] iv, PaddingMode paddingMode, int feedbackSizeInBits) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
DecryptCfb
public byte[] DecryptCfb(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2, int dupParam3) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
DecryptEcb
public byte[] DecryptEcb(byte[] ciphertext, PaddingMode paddingMode) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
DecryptEcb
public byte[] DecryptEcb(JCORefOut dupParam0, PaddingMode dupParam1) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
EncryptCbc
public byte[] EncryptCbc(byte[] plaintext, byte[] iv, PaddingMode paddingMode) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
EncryptCbc
public byte[] EncryptCbc(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
EncryptCfb
public byte[] EncryptCfb(byte[] plaintext, byte[] iv, PaddingMode paddingMode, int feedbackSizeInBits) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, CryptographicException
-
EncryptCfb
public byte[] EncryptCfb(JCORefOut dupParam0, JCORefOut dupParam1, PaddingMode dupParam2, int dupParam3) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, CryptographicException
-
EncryptEcb
public byte[] EncryptEcb(byte[] plaintext, PaddingMode paddingMode) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
EncryptEcb
public byte[] EncryptEcb(JCORefOut dupParam0, PaddingMode dupParam1) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
GetCiphertextLengthCbc
public int GetCiphertextLengthCbc(int plaintextLength, PaddingMode paddingMode) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
GetCiphertextLengthCfb
public int GetCiphertextLengthCfb(int plaintextLength, PaddingMode paddingMode, int feedbackSizeInBits) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
GetCiphertextLengthEcb
public int GetCiphertextLengthEcb(int plaintextLength, PaddingMode paddingMode) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
CreateDecryptor
public ICryptoTransform CreateDecryptor() throws java.lang.Throwable, PlatformNotSupportedException
- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
CreateDecryptor
public ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateDecryptor
public ICryptoTransform CreateDecryptor(JCORefOut dupParam0, JCORefOut dupParam1) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateEncryptor
public ICryptoTransform CreateEncryptor() throws java.lang.Throwable, PlatformNotSupportedException
- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
CreateEncryptor
public ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateEncryptor
public ICryptoTransform CreateEncryptor(JCORefOut dupParam0, JCORefOut dupParam1) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Create
public static SymmetricAlgorithm Create() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
Create
public static SymmetricAlgorithm Create(java.lang.String algName) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Clear
public void Clear() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
Dispose
public void Dispose() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException
-
GenerateIV
public void GenerateIV() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
GenerateKey
public void GenerateKey() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getIV
public byte[] getIV() throws java.lang.Throwable, PlatformNotSupportedException- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
setIV
public void setIV(byte[] IV) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
getKey
public byte[] getKey() throws java.lang.Throwable, PlatformNotSupportedException- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
setKey
public void setKey(byte[] Key) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, CryptographicException
-
getBlockSize
public int getBlockSize() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setBlockSize
public void setBlockSize(int BlockSize) throws java.lang.Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, CryptographicException
-
getFeedbackSize
public int getFeedbackSize() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setFeedbackSize
public void setFeedbackSize(int FeedbackSize) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, CryptographicException
-
getKeySize
public int getKeySize() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setKeySize
public void setKeySize(int KeySize) throws java.lang.Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, CryptographicException
-
getMode
public CipherMode getMode() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setMode
public void setMode(CipherMode Mode) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, CryptographicException
-
getLegalBlockSizes
public final KeySizes[] getLegalBlockSizes() throws java.lang.Throwable, PlatformNotSupportedException
- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
getLegalKeySizes
public final KeySizes[] getLegalKeySizes() throws java.lang.Throwable, PlatformNotSupportedException
- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
getPadding
public PaddingMode getPadding() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setPadding
public void setPadding(PaddingMode Padding) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, CryptographicException
-
-