Show / Hide Table of Contents

Class PublicKey

Inheritance
Object
PublicKey
DSAPublicKey
RSAPublicKey
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki.dll
Syntax
public abstract class PublicKey

Properties

Algorithm

Declaration
public abstract PKAlgorithm Algorithm { get; }
Property Value
Type Description
PKAlgorithm

KeySize

Declaration
public abstract int KeySize { get; }
Property Value
Type Description
Int32

Methods

Decode(Byte[])

Declaration
public static PublicKey Decode(byte[] content)
Parameters
Type Name Description
Byte[] content
Returns
Type Description
PublicKey

Decode(String)

Declaration
public static PublicKey Decode(string pem)
Parameters
Type Name Description
String pem
Returns
Type Description
PublicKey

GetEncodedValue()

Returns the DER encoding of the X.509 structure SubjectPublicKeyInfo

Declaration
public byte[] GetEncodedValue()
Returns
Type Description
Byte[]

GetEncryptionCsp()

Declaration
public IEncryptionCsp GetEncryptionCsp()
Returns
Type Description
IEncryptionCsp

GetInstance(AsymmetricAlgorithm)

Declaration
public static PublicKey GetInstance(AsymmetricAlgorithm csp)
Parameters
Type Name Description
AsymmetricAlgorithm csp
Returns
Type Description
PublicKey

GetPemEncoded()

Returns the PEM encoding of the public key

Declaration
public string GetPemEncoded()
Returns
Type Description
String

GetSignatureCsp(DigestAlgorithm)

Declaration
public ISignatureCsp GetSignatureCsp(DigestAlgorithm digestAlgorithm)
Parameters
Type Name Description
DigestAlgorithm digestAlgorithm
Returns
Type Description
ISignatureCsp

IsEquivalent(PublicKey)

Declaration
public bool IsEquivalent(PublicKey other)
Parameters
Type Name Description
PublicKey other
Returns
Type Description
Boolean

VerifyData(DigestAlgorithm, Byte[], Byte[])

Declaration
public bool VerifyData(DigestAlgorithm digestAlgorithm, byte[] dataSigned, byte[] signature)
Parameters
Type Name Description
DigestAlgorithm digestAlgorithm
Byte[] dataSigned
Byte[] signature
Returns
Type Description
Boolean

VerifyHash(DigestAlgorithm, Byte[], Byte[])

Declaration
public bool VerifyHash(DigestAlgorithm digestAlgorithm, byte[] hashSigned, byte[] signature)
Parameters
Type Name Description
DigestAlgorithm digestAlgorithm
Byte[] hashSigned
Byte[] signature
Returns
Type Description
Boolean
Back to top Copyright © 2015-2020 Lacuna Software