KeyCredential KeyCredential KeyCredential KeyCredential Class

Definition

Represents a key credential, an RSA, 2048-bit, asymmetric key that represents a user's identity for an application.

public : sealed class KeyCredential : IKeyCredentialpublic sealed class KeyCredential : IKeyCredentialPublic NotInheritable Class KeyCredential Implements IKeyCredential// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Name Name Name Name

Gets the name of the key credential.

public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The name of the key credential.

Methods

GetAttestationAsync() GetAttestationAsync() GetAttestationAsync() GetAttestationAsync()

Gets an attestation for a key credential. Call this method after provisioning a key credential for the current user and application.

public : IAsyncOperation<KeyCredentialAttestationResult> GetAttestationAsync()public IAsyncOperation<KeyCredentialAttestationResult> GetAttestationAsync()Public Function GetAttestationAsync() As IAsyncOperation( Of KeyCredentialAttestationResult )// You can use this method in JavaScript.
Returns

RequestSignAsync(IBuffer) RequestSignAsync(IBuffer) RequestSignAsync(IBuffer) RequestSignAsync(IBuffer)

Prompts the user to cryptographcally sign data using their key credential.

public : IAsyncOperation<KeyCredentialOperationResult> RequestSignAsync(IBuffer data)public IAsyncOperation<KeyCredentialOperationResult> RequestSignAsync(IBuffer data)Public Function RequestSignAsync(data As IBuffer) As IAsyncOperation( Of KeyCredentialOperationResult )// You can use this method in JavaScript.
Parameters
data
IBuffer IBuffer IBuffer IBuffer

The data to cryptographically sign.

Returns

RetrievePublicKey() RetrievePublicKey() RetrievePublicKey() RetrievePublicKey()

Gets the public portion of the asymmetric KeyCredential.

public : IBuffer RetrievePublicKey()public IBuffer RetrievePublicKey()Public Function RetrievePublicKey() As IBuffer// You can use this method in JavaScript.
Returns

The public portion of the asymmetric key credential.

See Also

RetrievePublicKey(CryptographicPublicKeyBlobType) RetrievePublicKey(CryptographicPublicKeyBlobType) RetrievePublicKey(CryptographicPublicKeyBlobType) RetrievePublicKey(CryptographicPublicKeyBlobType)

Gets the public portion of the asymmetric KeyCredential.

public : IBuffer RetrievePublicKey(CryptographicPublicKeyBlobType blobType)public IBuffer RetrievePublicKey(CryptographicPublicKeyBlobType blobType)Public Function RetrievePublicKey(blobType As CryptographicPublicKeyBlobType) As IBuffer// You can use this method in JavaScript.
Parameters
Returns

The public portion of the asymmetric key credential.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
See Also