Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Static Private Member Functions | Private Attributes
nsCrypto Class Reference

#include <nsCrypto.h>

Inheritance diagram for nsCrypto:
Inheritance graph
Collaboration diagram for nsCrypto:
Collaboration graph

List of all members.

Public Member Functions

 nsCrypto ()
virtual ~nsCrypto ()
nsresult init ()
nsIDOMCRMFObject generateCRMFRequest ()
DOMString importUserCertificates (in DOMString nickname, in DOMString cmmfResponse, in boolean doForcedBackup)
DOMString popChallengeResponse (in DOMString challenge)
DOMString random (in long numBytes)
DOMString signText (in DOMString stringToSign, in DOMString caOption)
void alert (in DOMString message)
void logout ()
void disableRightClick ()

Public Attributes

readonly attribute DOMString version
attribute boolean enableSmartCardEvents

Static Private Member Functions

static already_AddRefed
< nsIPrincipal
GetScriptPrincipal (JSContext *cx)

Private Attributes

PRBool mEnableSmartCardEvents

Detailed Description

Definition at line 84 of file nsCrypto.h.

Constructor & Destructor Documentation

Definition at line 237 of file nsCrypto.cpp.

nsCrypto::~nsCrypto ( ) [virtual]

Definition at line 242 of file nsCrypto.cpp.


Member Function Documentation

void nsIDOMCrypto::alert ( in DOMString  message) [inherited]

Definition at line 371 of file nsCrypto.cpp.

  JSStackFrame *fp = nsnull;
  nsIPrincipal *principal=nsnull;

  for (fp = JS_FrameIterator(cx, &fp); fp; fp = JS_FrameIterator(cx, &fp)) {
    cryptojs_GetFramePrincipal(cx, fp, &principal);
    if (principal != nsnull) {

  if (principal)
    return principal;

  nsIScriptContext *scriptContext = GetScriptContextFromJSContext(cx);

  if (scriptContext)
    nsCOMPtr<nsIScriptObjectPrincipal> globalData =
    NS_ENSURE_TRUE(globalData, nsnull);
    NS_IF_ADDREF(principal = globalData->GetPrincipal());

  return principal;

Here is the call graph for this function:

DOMString nsIDOMCrypto::importUserCertificates ( in DOMString  nickname,
in DOMString  cmmfResponse,
in boolean  doForcedBackup 
) [inherited]
void nsIDOMCrypto::logout ( ) [inherited]
DOMString nsIDOMCrypto::popChallengeResponse ( in DOMString  challenge) [inherited]
DOMString nsIDOMCrypto::random ( in long  numBytes) [inherited]
DOMString nsIDOMCrypto::signText ( in DOMString  stringToSign,
in DOMString  caOption 
) [inherited]

Member Data Documentation

Definition at line 45 of file nsIDOMCrypto.idl.

Definition at line 97 of file nsCrypto.h.

readonly attribute DOMString nsIDOMCrypto::version [inherited]

Definition at line 44 of file nsIDOMCrypto.idl.

The documentation for this class was generated from the following files: