Last active
January 29, 2018 10:59
-
-
Save kobvel/678b924a2c8f5f88a93eda97abe1cd41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Inject } from '@angular/core'; | |
import { ApiService } from './api.service'; | |
import { Hashwords, IHashwords } from './libs.providers'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
}) | |
export class AppComponent { | |
constructor( @Inject(Hashwords) public hashwords: IHashwords) { | |
const testHash = '90750f585b9ef687ed3eb54e911a4dd10153fc3dee51fc5548529adfdc3141fe'; | |
const humanHash = hashwords.hashStr(testHash); | |
const randomString = hashwords.random(); | |
console.log('Human readbale hash:', humanHash); | |
console.log('Random string:', randomString); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment