ipc/app/sha256.h
author Michael Comella <michael.l.comella@gmail.com>
Tue, 15 Sep 2015 16:46:58 -0700
changeset 266944 ed8188590f14b1aae2e4f44c8196994f375a99f4
parent 215799 abf353e4a1a7513c7c8a3557491e1118c9cb6c9e
permissions -rw-r--r--
Bug 1201206 - Correct menu button background on 2.3. r=mhaigh One fear is that different devices set different menu colors and text colors. Since we're using the default text color and set an explicit menu color, the text color may not look good on these devices. I was unable to find a way to override the menu text color. It seems the best way to find out if this is a problem is to land it and test though!

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// Stripped down version of security/nss/lib/freebl/blapi.h
// and related headers.

#ifndef _SHA256_H_
#define _SHA256_H_

#define SHA256_LENGTH 32 

#include "prtypes.h"	/* for PRUintXX */
#include "prlong.h"

#ifdef __cplusplus 
extern "C" {
#endif

struct SHA256Context {
  union {
    PRUint32 w[64];	    /* message schedule, input buffer, plus 48 words */
    PRUint8  b[256];
  } u;
  PRUint32 h[8];		/* 8 state variables */
  PRUint32 sizeHi,sizeLo;	/* 64-bit count of hashed bytes. */
};

typedef struct SHA256Context SHA256Context;

extern void
SHA256_Begin(SHA256Context *ctx);

extern void 
SHA256_Update(SHA256Context *ctx, const unsigned char *input,
		    unsigned int inputLen);

extern void
SHA256_End(SHA256Context *ctx, unsigned char *digest,
           unsigned int *digestLen, unsigned int maxDigestLen);

#ifdef __cplusplus 
} /* extern C */
#endif

#endif /* _SHA256_H_ */