public class CngKey extends NetObject implements java.lang.AutoCloseable
.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
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Security.Cryptography, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
|
static java.lang.String |
assemblyShortName
Assembly name: System.Security.Cryptography
|
static java.lang.String |
className
Qualified class name: System.Security.Cryptography.CngKey
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
CngKey() |
CngKey(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static CngKey |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into CngKey, 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 name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
JCType |
getJCOType()
Returns the instantiated class Type
|
java.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(SafeNCryptKeyHandle keyHandle,
CngKeyHandleOpenOptions keyHandleOpenOptions) |
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) |
void |
setExportPolicy(CngExportPolicies ExportPolicy) |
void |
setIsEphemeral(boolean IsEphemeral) |
void |
setJCOInstance(JCObject instance) |
void |
SetProperty(CngProperty property) |
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public CngKey()
throws java.lang.Throwable
java.lang.Throwablepublic CngKey(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic static CngKey cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into CngKey, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedCngKey instancejava.lang.Throwable - in case of error during cast operationpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic static CngKey Create(CngAlgorithm algorithm) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, CryptographicException
public static CngKey Create(CngAlgorithm algorithm, java.lang.String keyName) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionObjectDisposedExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic static CngKey Create(CngAlgorithm algorithm, java.lang.String keyName, CngKeyCreationParameters creationParameters) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MissingMethodException, TargetInvocationException, IndexOutOfRangeException, FormatException, CryptographicException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic void Delete()
throws java.lang.Throwable,
PlatformNotSupportedException,
ObjectDisposedException,
ArgumentException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
NotSupportedException,
InvalidOperationException,
FormatException,
CryptographicException
public void Dispose()
throws java.lang.Throwable,
PlatformNotSupportedException,
ObjectDisposedException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionObjectDisposedExceptionArgumentNullExceptionpublic static boolean Exists(java.lang.String keyName)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
MissingMethodException,
TargetInvocationException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
CryptographicException
public static boolean Exists(java.lang.String keyName,
CngProvider provider)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
ArgumentNullException,
MissingMethodException,
TargetInvocationException,
PlatformNotSupportedException,
ObjectDisposedException,
IndexOutOfRangeException,
FormatException,
CryptographicException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionObjectDisposedExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic static boolean Exists(java.lang.String keyName,
CngProvider provider,
CngKeyOpenOptions options)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
ArgumentNullException,
MissingMethodException,
TargetInvocationException,
IndexOutOfRangeException,
FormatException,
CryptographicException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic byte[] Export(CngKeyBlobFormat format) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, CryptographicException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic CngAlgorithm getAlgorithm() throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, CryptographicException, ArgumentNullException
public CngAlgorithmGroup getAlgorithmGroup() throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, CryptographicException, ArgumentNullException
public CngExportPolicies getExportPolicy() throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, CryptographicException
public SafeNCryptKeyHandle getHandle() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, MissingMethodException, TargetInvocationException, ObjectDisposedException
public boolean getIsEphemeral()
throws java.lang.Throwable,
PlatformNotSupportedException,
ObjectDisposedException
java.lang.ThrowablePlatformNotSupportedExceptionObjectDisposedExceptionpublic boolean getIsMachineKey()
throws java.lang.Throwable,
ObjectDisposedException,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
IndexOutOfRangeException,
FormatException,
InvalidOperationException,
CryptographicException
public java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectJCType representing the CLR Type of the instantiated Classpublic java.lang.String getKeyName()
throws java.lang.Throwable,
ObjectDisposedException,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
IndexOutOfRangeException,
FormatException,
InvalidOperationException,
CryptographicException
public int getKeySize()
throws java.lang.Throwable,
ObjectDisposedException,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
IndexOutOfRangeException,
ArrayTypeMismatchException,
InvalidOperationException,
FormatException,
CryptographicException,
ArgumentNullException,
NotSupportedException
public CngKeyUsages getKeyUsage() throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, CryptographicException
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
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic CngProvider getProvider() throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, CryptographicException, ArgumentNullException
public SafeNCryptProviderHandle getProviderHandle() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, MissingMethodException, TargetInvocationException, ObjectDisposedException
public CngUIPolicy getUIPolicy() throws java.lang.Throwable, PlatformNotSupportedException, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, InvalidOperationException, FormatException, CryptographicException
public java.lang.String getUniqueName()
throws java.lang.Throwable,
ObjectDisposedException,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
IndexOutOfRangeException,
FormatException,
InvalidOperationException,
CryptographicException
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
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format) throws java.lang.Throwable, ArgumentNullException, ArgumentException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, CryptographicException, ArgumentOutOfRangeException, OutOfMemoryException, InvalidOperationException
public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, CryptographicException, OutOfMemoryException, FormatException
public static CngKey Import(JCORefOut dupParam0, CngKeyBlobFormat dupParam1) throws java.lang.Throwable, ArgumentNullException, ArgumentException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, CryptographicException, ArgumentOutOfRangeException, OutOfMemoryException, InvalidOperationException
public static CngKey Import(JCORefOut dupParam0, CngKeyBlobFormat dupParam1, CngProvider dupParam2) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, CryptographicException, OutOfMemoryException, FormatException
public static CngKey Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MissingMethodException, TargetInvocationException, CryptographicException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionCryptographicExceptionpublic static CngKey Open(java.lang.String keyName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, CryptographicException
public static CngKey Open(java.lang.String keyName, CngProvider provider) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ObjectDisposedException, IndexOutOfRangeException, FormatException, CryptographicException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionObjectDisposedExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic static CngKey Open(java.lang.String keyName, CngProvider provider, CngKeyOpenOptions openOptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MissingMethodException, TargetInvocationException, IndexOutOfRangeException, FormatException, CryptographicException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionIndexOutOfRangeExceptionFormatExceptionCryptographicExceptionpublic void setExportPolicy(CngExportPolicies ExportPolicy) throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, ArrayTypeMismatchException, InvalidOperationException, FormatException, CryptographicException
public void setIsEphemeral(boolean IsEphemeral)
throws java.lang.Throwable,
PlatformNotSupportedException,
ObjectDisposedException,
ArgumentException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
NotSupportedException,
InvalidOperationException,
FormatException,
CryptographicException
public void setJCOInstance(JCObject instance)
setJCOInstance in class NetObjectpublic void SetProperty(CngProperty property) throws java.lang.Throwable, PlatformNotSupportedException, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, InvalidOperationException, FormatException, CryptographicException, ObjectDisposedException