hashService.ts 652 字节
Newer Older
B
Benjamin Pasero 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { createHash } from 'crypto';
import { IHashService } from 'vs/workbench/services/hash/common/hashService';

export class HashService implements IHashService {

	_serviceBrand: any;

	public createSHA1(content: string): string {
		return createHash('sha1').update(content).digest('hex');
	}
}