File

src/app/share/md5.service.ts

Index

Methods

Constructor

constructor()

Methods

Public fromString
fromString(contents: string)
Parameters :
Name Type Optional
contents string No
Returns : string
import { Injectable } from '@angular/core';
import * as SparkMD5 from 'spark-md5';

@Injectable({
  providedIn: 'root',
})
export class Md5Service {

  constructor() { }

  public fromString(contents: string): string {
    return SparkMD5.hash(contents);
  }
}

result-matching ""

    No results matching ""