API Docs for: 1.3.12
Show:

EcIdentity Class

An identity is an alias that a person or system may own. It consists of a private key and a display name. Using the private key we may: 1. Perform all operations of a EcContact. 2. Decrypt messages using our private key. 3. Sign messages, ensuring the recipient knows that we sent the message and it was not altered.

Item Index

Methods

fromCredential

(
  • credential
  • secret
  • source
)
EcIdentity static

Helper function to decrypt a credential (storable version of an identity) into an identity)

Parameters:

  • credential EbacCredential

    Credential to decrypt.

  • secret String

    AES secret used to decrypt the credential.

  • source String

    Source of the credential, used to track where a credential came from.

Returns:

EcIdentity:

Decrypted identity object, ready for use.

toContact

() EcContact

Converts an identity to a contact.

Returns:

EcContact:

Contact object.

toCredential

(
  • secret
)
EbacCredential

Helper function to encrypt an identity into a credential (storable version of an identity)

Parameters:

  • secret String

    AES secret used to encrypt the credential.

Returns:

EbacCredential:

Encrypted credential object.

Properties

displayName

String

Display name of this identity

displayName

String

String identifying where this identity came from

ppk

EcPpk

Private Key of this identity