Stores the _PushStatus when sending push, set pending, and running states

This commit is contained in:
Florent Vilmart
2016-03-12 14:32:39 -05:00
parent 308fe1498a
commit 4d401d9daa
5 changed files with 104 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
/* @flow */
import { randomBytes } from 'crypto';
import { randomBytes, createHash } from 'crypto';
// Returns a new random hex string of the given even size.
export function randomHexString(size: number): string {
@@ -44,3 +44,7 @@ export function newObjectId(): string {
export function newToken(): string {
return randomHexString(32);
}
export function md5Hash(string: string): string {
return createHash('md5').update(string).digest('hex');
}