Skip to content

JoeTac/angular.openpgp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

This is a simplified wrapper for openpgpjs/openpgpjs

Examples

Generating New Keys

angular.module("SampleModule", ["OpenPGP"])
  .controller("SampleController", ["$scope", "$log", "$pgp", 
    function($scope, $log, $pgp) {
      $scope.user = {
        name:  'John Doe',
        email: 'johndoe@server.com',
        passphrase: 'my super secret password',
        pubkey: '',
        privkey: ''
      }
  $scope.generateKeys = function() {
    //keySize should be increased. Only using smaller size for testing
    $pgp.keygen($scope.name, $scope.email, $scope.passphrase, 512) 
		.then(function(result) {
			$scope.pubkey = result.publicKeyArmored;
		  $scope.privkey = result.privateKeyArmored;
		},
		function(error) {
  	  $log.error(error);
  	});
  }

}]);

About

Simplified OpenPGP wrapper for openpgpjs/openpgpjs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published