Table of Contents

Class CryptoKey

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
[Value("CryptoKey")]
public class CryptoKey
Inheritance
CryptoKey
Inherited Members

Remarks

For security reasons, the CryptoKey interface can only be used in a secure context.

-Web Crypto API
-Web security
-Privacy, permissions, and information security
-Crypto and Subtle.

See also on MDN

Constructors

CryptoKey()

public CryptoKey()

Properties

Algorithm

The read-only algorithm property of the CryptoKey interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.

[Value("algorithm")]
public Object Algorithm { get; }

Property Value

Object

An object matching:For RsaHashedKeyGenParams and HmacKeyGenParams, the hash property is always in the object form (with a property called name), not the string form.

Remarks

The object returned depends of the algorithm used to generate the key.

See also on MDN

Extractable

The read-only extractable property of the CryptoKey interface indicates whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey().

[Value("extractable")]
public bool Extractable { get; }

Property Value

bool

A boolean value that is true if the key can be exported and false if not.

Remarks

If the key cannot be exported, exportKey() or wrapKey() will throw an exception if used to extract it.

See also on MDN

Type

The read-only type property of the CryptoKey interface indicates which kind of key is represented by the object. It can have the following values:

[Value("type")]
public KeyType Type { get; }

Property Value

KeyType

One of the following strings: "secret", "private", or "public".

Remarks

Usages

The read-only usages property of the CryptoKey interface indicates what can be done with the key.

[Value("usages")]
public Object Usages { get; }

Property Value

Object

An Array of strings from the following list:

Remarks