angular-hmac-sha512

AngularJS Module. A Simple Service to Encrypt Use Hmac-sha512

Homepage

Module License: MIT

Added by: Sam Deering

GitHub

Repository

diablofong/angular-hmac-sha512

Stats

Stars: 4

Watchers: 4

Forks: 1

Author

Duncan
Duncan

Module Description

angular-hmac-sha512

AngularJS Module. that integrate cryptography functionality offers from the crypto-js project. A Simple Service to Encrypt Use Hmac-sha512.

#required

#install(bower)

  • bower install angular-hmac-sha512
<script type='text/javascript' src="[bower_components/]angular-hmac-sha512/src/angular-hmac-sha512.js"></script>

#install(manual)

<script type='text/javascript' src="src/angular-hmac-sha512.js"></script>

#usage

  • add encrypt module to angular
 var myApp = angular.module('app', ['angular-hmac-sha512']); 
  • set Secret in config or controller
 //in config
 angular.module.('app').config(['$crypthmacProvider',   function($crypthmacProvider){
        $crypthmacProvider.setCryptoSecret('jfoiwjfwoifje83');
 });
 
 //in controller
 App.controller('demo_nosecret',['$scope','$crypthmac',function($scope,$crypthmac){
    $scope.execute = function () {
        var encrypttext = $crypthmac.encrypt($scope.plantext,"");
    };
}]);
  • example to use encrypt
 //in controller
 App.controller('demo_nosecret',['$scope','$crypthmac',function($scope,$crypthmac){
    $scope.execute = function () {
        var encrypttext = $crypthmac.encrypt($scope.plantext,"");
        console.log(encrypttext);
    };
}]);

#demo

###demo site

#License

###The MIT License (MIT)

Module stats last updated: 2015-06-04 11:08:45

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!