Certes
Show / Hide Table of Contents

Class KeyFactory

Provides helper methods for handling keys.

Inheritance
object
KeyFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Certes
Assembly: Certes.dll
Syntax
public static class KeyFactory

Methods

| Edit this page View Source

FromDer(byte[])

Parse the key from DER encoded data.

Declaration
public static IKey FromDer(byte[] der)
Parameters
Type Name Description
byte[] der

The DER encoded data.

Returns
Type Description
IKey

The key restored.

| Edit this page View Source

FromPem(string)

Parse the key from PEM encoded text.

Declaration
public static IKey FromPem(string pem)
Parameters
Type Name Description
string pem

The PEM encoded text.

Returns
Type Description
IKey

The key restored.

| Edit this page View Source

NewKey(KeyAlgorithm, int?)

Creates a random key.

Declaration
public static IKey NewKey(KeyAlgorithm algorithm, int? keySize = null)
Parameters
Type Name Description
KeyAlgorithm algorithm

The algorithm to use.

int? keySize

Optional key size (used for RSA, defaults to 2048)

Returns
Type Description
IKey

The key created.

  • Edit this page
  • View Source
© 2018 Certes Project
Back to top