Skip to content

Instantly share code, notes, and snippets.

@kobvel
Last active January 29, 2018 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobvel/678b924a2c8f5f88a93eda97abe1cd41 to your computer and use it in GitHub Desktop.
Save kobvel/678b924a2c8f5f88a93eda97abe1cd41 to your computer and use it in GitHub Desktop.
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