Package system.security.cryptography
Class CngKey
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.security.cryptography.CngKey
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IJCOBridgeReflected
public class CngKey extends NetObject implements java.lang.AutoCloseable
The base .NET class managing System.Security.Cryptography.CngKey, 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.CngKey
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.String
assemblyFullName
Fully assembly qualified name: System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.String
assemblyShortName
Assembly name: System.Security.Cryptographystatic java.lang.String
className
Qualified class name: System.Security.Cryptography.CngKeystatic JCType
classType
The type managed from JCOBridge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CngKey
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoCngKey
, a cast assert is made to check if types are compatible.void
close()
static CngKey
Create(CngAlgorithm algorithm)
static CngKey
Create(CngAlgorithm algorithm, java.lang.String keyName)
static CngKey
Create(CngAlgorithm algorithm, java.lang.String keyName, CngKeyCreationParameters creationParameters)
void
Delete()
void
Dispose()
static boolean
Exists(java.lang.String keyName)
static boolean
Exists(java.lang.String keyName, CngProvider provider)
static boolean
Exists(java.lang.String keyName, CngProvider provider, CngKeyOpenOptions options)
byte[]
Export(CngKeyBlobFormat format)
CngAlgorithm
getAlgorithm()
CngAlgorithmGroup
getAlgorithmGroup()
CngExportPolicies
getExportPolicy()
SafeNCryptKeyHandle
getHandle()
boolean
getIsEphemeral()
boolean
getIsMachineKey()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typejava.lang.String
getKeyName()
int
getKeySize()
CngKeyUsages
getKeyUsage()
CngProperty
GetProperty(java.lang.String name, CngPropertyOptions options)
CngProvider
getProvider()
SafeNCryptProviderHandle
getProviderHandle()
CngUIPolicy
getUIPolicy()
java.lang.String
getUniqueName()
boolean
HasProperty(java.lang.String name, CngPropertyOptions options)
static CngKey
Import(byte[] keyBlob, CngKeyBlobFormat format)
static CngKey
Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider)
static CngKey
Import(JCORefOut dupParam0, CngKeyBlobFormat dupParam1)
static CngKey
Import(JCORefOut dupParam0, CngKeyBlobFormat dupParam1, CngProvider dupParam2)
static CngKey
Open(java.lang.String keyName)
static CngKey
Open(java.lang.String keyName, CngProvider provider)
static CngKey
Open(java.lang.String keyName, CngProvider provider, CngKeyOpenOptions openOptions)
static CngKey
Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions)
void
setExportPolicy(CngExportPolicies ExportPolicy)
void
setIsEphemeral(boolean IsEphemeral)
void
setJCOInstance(JCObject instance)
void
SetProperty(CngProperty property)
-
-
-
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.CngKey- See Also:
- Constant Field Values
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static CngKey cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoCngKey
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
CngKey
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
Exists
public static boolean Exists(java.lang.String keyName, CngProvider provider, CngKeyOpenOptions options) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
FormatException
CryptographicException
-
Exists
public static boolean Exists(java.lang.String keyName, CngProvider provider) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
PlatformNotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
ObjectDisposedException
IndexOutOfRangeException
FormatException
CryptographicException
-
Exists
public static boolean Exists(java.lang.String keyName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidOperationException, ArgumentOutOfRangeException, CryptographicException
-
HasProperty
public boolean HasProperty(java.lang.String name, CngPropertyOptions options) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
FormatException
CryptographicException
-
Export
public byte[] Export(CngKeyBlobFormat format) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
FormatException
CryptographicException
-
Create
public static CngKey Create(CngAlgorithm algorithm, java.lang.String keyName, CngKeyCreationParameters creationParameters) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
FormatException
CryptographicException
-
Create
public static CngKey Create(CngAlgorithm algorithm, java.lang.String keyName) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
PlatformNotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
ObjectDisposedException
IndexOutOfRangeException
FormatException
CryptographicException
-
Create
public static CngKey Create(CngAlgorithm algorithm) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidOperationException, ArgumentOutOfRangeException, CryptographicException
-
Import
public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, CryptographicException, OutOfMemoryException, FormatException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
PlatformNotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
CryptographicException
OutOfMemoryException
FormatException
-
Import
public static CngKey Import(JCORefOut dupParam0, CngKeyBlobFormat dupParam1, CngProvider dupParam2) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, CryptographicException, OutOfMemoryException, FormatException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
PlatformNotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
CryptographicException
OutOfMemoryException
FormatException
-
Import
public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, CryptographicException, ArgumentOutOfRangeException, OutOfMemoryException, InvalidOperationException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
NotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
CryptographicException
ArgumentOutOfRangeException
OutOfMemoryException
InvalidOperationException
-
Import
public static CngKey Import(JCORefOut dupParam0, CngKeyBlobFormat dupParam1) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, CryptographicException, ArgumentOutOfRangeException, OutOfMemoryException, InvalidOperationException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
NotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
CryptographicException
ArgumentOutOfRangeException
OutOfMemoryException
InvalidOperationException
-
Open
public static CngKey Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
FormatException
CryptographicException
-
Open
public static CngKey Open(java.lang.String keyName, CngProvider provider, CngKeyOpenOptions openOptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
FormatException
CryptographicException
-
Open
public static CngKey Open(java.lang.String keyName, CngProvider provider) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
PlatformNotSupportedException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
ObjectDisposedException
IndexOutOfRangeException
FormatException
CryptographicException
-
Open
public static CngKey Open(java.lang.String keyName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidOperationException, ArgumentOutOfRangeException, CryptographicException
-
GetProperty
public CngProperty GetProperty(java.lang.String name, CngPropertyOptions options) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, CryptographicException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
FormatException
CryptographicException
-
Delete
public void Delete() throws java.lang.Throwable, ObjectDisposedException, InvalidOperationException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, NotSupportedException, FormatException, CryptographicException
-
Dispose
public void Dispose() throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException
- Throws:
java.lang.Throwable
ObjectDisposedException
ArgumentNullException
-
SetProperty
public void SetProperty(CngProperty property) throws java.lang.Throwable, InvalidOperationException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, ArrayTypeMismatchException, NotSupportedException, FormatException, CryptographicException, ObjectDisposedException
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
getIsEphemeral
public boolean getIsEphemeral() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
setIsEphemeral
public void setIsEphemeral(boolean IsEphemeral) throws java.lang.Throwable, ObjectDisposedException, InvalidOperationException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, NotSupportedException, FormatException, CryptographicException
-
getIsMachineKey
public boolean getIsMachineKey() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException, ArgumentNullException
-
getKeySize
public int getKeySize() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException
-
getHandle
public SafeNCryptKeyHandle getHandle() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ArgumentNullException, ObjectDisposedException
-
getProviderHandle
public SafeNCryptProviderHandle getProviderHandle() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ArgumentNullException, ObjectDisposedException
-
getAlgorithm
public CngAlgorithm getAlgorithm() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException
-
getAlgorithmGroup
public CngAlgorithmGroup getAlgorithmGroup() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException
-
getExportPolicy
public CngExportPolicies getExportPolicy() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException, ArgumentNullException
-
setExportPolicy
public void setExportPolicy(CngExportPolicies ExportPolicy) throws java.lang.Throwable, ObjectDisposedException, InvalidOperationException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, ArrayTypeMismatchException, FormatException, CryptographicException
-
getKeyUsage
public CngKeyUsages getKeyUsage() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException, ArgumentNullException
-
getProvider
public CngProvider getProvider() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, CryptographicException
-
getUIPolicy
public CngUIPolicy getUIPolicy() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException, CryptographicException
-
getKeyName
public java.lang.String getKeyName() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
-
getUniqueName
public java.lang.String getUniqueName() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
-
-