Show / Hide Table of Contents

PivEccPublicKey Constructor

PivEccPublicKey(ReadOnlySpan<byte>, PivAlgorithm?)

Create a new instance of an ECC public key object based on the given point.

C#
[Obsolete("Usage of PivEccPublic/PivEccPrivateKey is deprecated. Use IPublicKey, IPrivateKey instead", false)]
public PivEccPublicKey(ReadOnlySpan<byte> publicPoint, PivAlgorithm? algorithm = null)

Parameters

Type Name Description
ReadOnlySpan<byte> publicPoint

The public point to use to build the object.

PivAlgorithm? algorithm

The algorithm used, if empty, it will be determined at best effort.

Exceptions

Type Condition
ArgumentException

The format of the public point is not supported.

Remarks

The point must be provided in the following form

04 || x-coordinate || y-coordinate
each coordinate must be the same size, either 32 bytes (256 bits)
or 48 bytes (384 bits).
Prepend 00 bytes if necessary.

The class will determine the algorithm (PivAlgorithm.EccP256 or PivAlgorithm.EccP384) based on the size of the point.

In this article
Back to top Generated by DocFX