Stores the _PushStatus when sending push, set pending, and running states
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user