C# Class FiftyOne.Foundation.Licence.Key

Encapsulates a licence key.
Datei anzeigen Open project: 51Degrees/dotNET-Device-Detection

Protected Properties

Property Type Description
_endDateOffset ushort
_products List
_startDateOffset ushort

Public Methods

Method Description
Key ( String encodedText ) : System

Constructs a new Key instance.

ToArray ( ) : byte[]

Persists data about the Licence. Writer attached to an output stream for data storage.

ToString ( ) : string

Returns the encoded text for the licence key.

Protected Methods

Method Description
Convert ( System.DateTime date ) : ushort

Converts a date for internal storage as a ushort.

Key ( ) : System

Used by any subclasses to construct a new Key instance.

Private Methods

Method Description
DSAVerifyHash ( byte hashValue, byte signedHashValue, string xmlKeyInfo, string hashAlg ) : bool

Validates the signature that follows the Licence data

Method Details

Convert() protected static method

Converts a date for internal storage as a ushort.
protected static Convert ( System.DateTime date ) : ushort
date System.DateTime Date to be converted.
return ushort

Key() protected method

Used by any subclasses to construct a new Key instance.
protected Key ( ) : System
return System

Key() public method

Constructs a new Key instance.
public Key ( String encodedText ) : System
encodedText String The encoded Licence text.
return System

ToArray() public method

Persists data about the Licence. Writer attached to an output stream for data storage.
public ToArray ( ) : byte[]
return byte[]

ToString() public method

Returns the encoded text for the licence key.
public ToString ( ) : string
return string

Property Details

_endDateOffset protected_oe property

The offset for the date the licence is valid until.
protected ushort _endDateOffset
return ushort

_products protected_oe property

List of products the key can be used with.
protected List _products
return List

_startDateOffset protected_oe property

The offset for the date the licence is valid from.
protected ushort _startDateOffset
return ushort