Result:
found 356 distributions and 1365 files matching your query ! ( run in 5.155 )


Authen-NZRealMe

 view release on metacpan or  search on metacpan

lib/Authen/NZRealMe/ServiceProvider/CertFactory.pm  view on Meta::CPAN

    die "'$conf_dir' is not a directory\n" unless -d "$conf_dir/.";

    $args{domain} =~ s/^(www|secure)[.]//;

    my $key_file = "$conf_dir/sp-sign-key.pem";
    _generate_private_key($key_file);
    _generate_certificate('sig', $key_file, \%args);

    $key_file = "$conf_dir/sp-ssl-key.pem";
    _generate_private_key($key_file);
    _generate_certificate('ssl', $key_file, \%args);

    if(not $args{self_signed}) {
        print "\nSuccessfully generated two certificate signing requests.\n"
            . "You can dump the CSR contents to confirm with:\n\n"

lib/Authen/NZRealMe/ServiceProvider/CertFactory.pm  view on Meta::CPAN

        return 0 if $resp =~ /^(n|no)$/i;
    }
}


sub _generate_private_key {
    my($key_path) = @_;

    system('openssl', 'genrsa', '-out', $key_path, '2048') == 0
        or exit 1;
}

 view all matches for this distribution


Authen-Ticket

 view release on metacpan or  search on metacpan

lib/Authen/Ticket/Signature.pm  view on Meta::CPAN

  return '';
}

# called to either retrieve stored private key or generate public/private
# pair
sub get_private_key {
  my $self = shift;

#  tie_keys;

  my $id = $self->{TicketSignatureId} || '<none>';

lib/Authen/Ticket/Signature.pm  view on Meta::CPAN

}

sub sign_ticket {
  my($self, $ticket) = @_;

  my $private_key = $self->get_private_key;

  return '' unless $private_key;

  my($p, $g, $x) = map $private_key->{$_}, (qw/p g x/);
  my $msg = OpenSSL::BN::hex2bn(MD5->hexhash($ticket));

  my $k;
  do { $k = OpenSSL::BN::rand( $p->num_bits - 1);
  } until $k->gcd( $p - 1 ) == 1;

lib/Authen/Ticket/Signature.pm  view on Meta::CPAN

  { 'y' => $y, 'p' => $p, 'g' => $g }

This is returned by the key server as the string "y:$y;p:$p;g:$g" with
the values in hexadecimal.

=item $self->get_private_key

This routine will return the private key as appropriate according to the
server configuration.  If the required key is not available in cache, it
will be generated.  Since the private key is only to be used on the machine
it is generated on, it does not make sense to fetch the private key from

lib/Authen/Ticket/Signature.pm  view on Meta::CPAN

This routine must return the private and public key parts with a nominal
key length of $key_length.  See the get_{private,public}_key routines
for the format of the key parts.  The actual value returned is an array
of the format:

  ( { private_key }, { public_key } )

=item $self->sign_ticket( $ticket )

This routine should attach a signature to $ticket and return the resulting
value.  The format used must be understood by $self->verify_ticket.  The

 view all matches for this distribution


Authen-U2F-Tester

 view release on metacpan or  search on metacpan

lib/Authen/U2F/Tester.pm  view on Meta::CPAN

        }
    }

    # generate a new keypair for this application
    my $keypair = Authen::U2F::Tester::Keypair->new;
    my $handle  = $self->keystore->put($keypair->private_key);
    my $cert    = $self->certificate->as_string(Crypt::OpenSSL::X509::FORMAT_ASN1);

    my %client_data = (
        typ        => 'navigator.id.finishEnrollment',
        challenge  => $challenge,

 view all matches for this distribution


Bitcoin-Crypto

 view release on metacpan or  search on metacpan

ex/tx/taproot_script_redeem.pl  view on Meta::CPAN

# - signing with two private keys to satisfy 2 out of 3 transaction
# - leaving one empty signature for the one signature we don't use (second item)
# - signing with SIGHASH_DEFAULT, so it does not need to be passed explicitly
# - not adding annex, since it has no meaning yet (can lead to funds loss)

my $private_key_1 = btc_prv->from_wif('L2eKy3kX5DYnw7B1sXpEs2gd9xK5PSkiiBS1YSFaHvYyn1M9rsJJ');
my $private_key_3 = btc_prv->from_wif('L2zrD2aQRgGHzJpX7TB7qYhzibFqitH3NyvZUJUzqfHaLmxyBvm5');

# we want to use these keys for schnorr signatures, so we mark them as taproot outputs
$private_key_1->set_taproot_output(!!1);
$private_key_3->set_taproot_output(!!1);

# use sign to build a witness semi-manually
$tx
	->sign(
		signing_index => 0,
		script_tree => $tree,
		leaf_id => 0,
		public_key => $public_key,
	)
	->add_signature($private_key_1)
	->add_signature('')
	->add_signature($private_key_3)
	->finalize;

# verify the correctness of the transaction. Throws an exception on failure
$tx->verify;

 view all matches for this distribution


Bitcoin-Secp256k1

 view release on metacpan or  search on metacpan

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	$calling_sub =~ s/^${package}:://;

	croak "bad or undefined arguments, usage: \$secp256k1->$calling_sub($args_str)";
}

sub verify_private_key
{
	my ($self, $private_key) = @_;

	(defined $private_key)
		or _croak_usage(qw($private_key));

	return $self->_verify_privkey($private_key);
}

sub verify_public_key
{
	my ($self, $public_key) = @_;

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	}
}

sub create_public_key
{
	my ($self, $private_key) = @_;

	(defined $private_key)
		or _croak_usage(qw($private_key));

	$self->_create_pubkey($private_key);
	return $self->_pubkey;
}

sub normalize_signature
{

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	return $self->_pubkey($public_key, $compressed);
}

sub sign_message
{
	my ($self, $private_key, $message) = @_;

	(defined $private_key and defined $message)
		or _croak_usage(qw($private_key $message));

	return $self->sign_digest($private_key, sha256(sha256($message)));
}

sub sign_message_schnorr
{
	my ($self, $private_key, $message) = @_;

	(defined $private_key and defined $message)
		or _croak_usage(qw($private_key $message));

	return $self->sign_digest_schnorr($private_key, sha256($message));
}

sub sign_message_recoverable
{
	my ($self, $private_key, $message) = @_;

	(defined $private_key and defined $message)
		or _croak_usage(qw($private_key $message));

	return $self->sign_digest_recoverable($private_key, sha256(sha256($message)));
}

sub sign_digest
{
	my ($self, $private_key, $digest) = @_;

	(defined $private_key and defined $digest)
		or _croak_usage(qw($private_key $digest));

	$self->_sign($private_key, $digest);
	return $self->_signature;
}

sub sign_digest_schnorr
{
	my ($self, $private_key, $digest) = @_;

	(defined $private_key and defined $digest)
		or _croak_usage(qw($private_key $digest));

	$self->_sign_schnorr($private_key, $digest);
	return $self->_signature_schnorr;
}

sub sign_digest_recoverable
{
	my ($self, $private_key, $digest) = @_;

	(defined $private_key and defined $digest)
		or _croak_usage(qw($private_key $digest));

	$self->_sign_recoverable($private_key, $digest);
	return $self->_signature_recoverable;
}

sub recover_public_key_message
{

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	$self->_pubkey_negate;

	return $self->_pubkey;
}

sub negate_private_key
{
	my ($self, $private_key) = @_;

	(defined $private_key)
		or _croak_usage(qw($private_key));

	return $self->_privkey_negate($private_key);
}

sub xonly_public_key
{
	my ($self, $public_key) = @_;

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	$self->_pubkey_add($tweak);

	return $self->_pubkey;
}

sub add_private_key
{
	my ($self, $private_key, $tweak) = @_;

	(defined $private_key and defined $tweak)
		or _croak_usage(qw($private_key $tweak));

	return $self->_privkey_add($private_key, $tweak);
}

sub multiply_public_key
{
	my ($self, $public_key, $tweak) = @_;

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	$self->_pubkey_mul($tweak);

	return $self->_pubkey;
}

sub multiply_private_key
{
	my ($self, $private_key, $tweak) = @_;

	(defined $private_key and defined $tweak)
		or _croak_usage(qw($private_key $tweak));

	return $self->_privkey_mul($private_key, $tweak);
}

sub combine_public_keys
{
	my ($self, @public_keys) = @_;

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN


	# first, create a context
	my $secp256k1 = Bitcoin::Secp256k1->new;

	# then, use it to perform ECC operations
	my $public_key = $secp256k1->create_public_key($private_key);
	my $signature = $secp256k1->sign_message($private_key, $message);
	my $valid = $secp256k1->verify_message($public_key, $signature, $message);

	# Schnorr signatures are implemented
	my $schnorr_signature = $secp256k1->sign_message_schnorr($private_key, $message);
	my $xonly_public_key = $secp256k1->xonly_public_key($public_key);
	my $valid = $secp256k1->verify_message_schnorr($xonly_public_key, $schnorr_signature, $message);

	# Recoverable signatures (used in Ethereum)
	my $recoverable_signature = $secp256k1->sign_message_recoverable($private_key, $message);
	my $recovered_pubkey = $secp256k1->recover_public_key_message($recoverable_signature, $message);
	my $valid = $secp256k1->verify_message_recoverable($public_key, $recoverable_signature, $message);

=head1 DESCRIPTION

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

	$secp256k1 = Bitcoin::Secp256k1->new()

Object constructor. All methods in this package require this object to work
properly. It accepts no arguments.

=head3 verify_private_key

	$valid = $secp256k1->verify_private_key($private_key)

Checks whether bytestring C<$private_key> is a valid private key. Private key
is valid if its length is exactly C<32> and it is below curve order and above 0
(when interpreted as a big-endian integer).

Some methods in this module may die if their private key is not valid, but
chances of picking an invalid 32-byte private key at random are extremely slim.

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

Checks whether bytestring C<$public_key> is a valid public key. Some methods in
this module may die if their public key is not valid.

=head3 create_public_key

	$public_key = $secp256k1->create_public_key($private_key)

Creates a public key from a bytestring C<$private_key> and returns a bytestring
C<$public_key>. C<$private_key> must have exact length of C<32>.

The public key is always returned in compressed form, use L</compress_public_key> to get uncompressed form.

=head3 normalize_signature

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

signature verification, they produce different Bitcoin addresses (because
address is a hashed public key).

=head3 sign_message

	$signature = $secp256k1->sign_message($private_key, $message)

Signs C<$message>, which may be a bytestring of any length, with
C<$private_key>, which must be a bytestring of length C<32>. Returns
DER-encoded C<$signature> as a bytestring.

C<$message> is first hashed with double SHA256 (known as HASH256 in Bitcoin)
before passing it to signing algorithm (which expects length C<32> bytestrings).

This method always produces normalized, deterministic signatures suitable to
use inside a Bitcoin transaction.

=head3 sign_message_schnorr

	$signature = $secp256k1->sign_message_schnorr($private_key, $message)

Signs C<$message>, which may be a bytestring of any length, with
C<$private_key>, which must be a bytestring of length C<32>. Returns
a Schnorr C<$signature> as a bytestring.

C<$message> is first hashed with SHA256 before passing it to signing algorithm.

This signature is not deterministic, since signing with Schnorr uses 32 bytes

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

C<$Bitcoin::Secp256k1::FORCED_SCHNORR_AUX_RAND> to any bytestring of length
C<32>.

=head3 sign_message_recoverable

	$signature = $secp256k1->sign_message_recoverable($private_key, $message)

Signs C<$message>, which may be a bytestring of any length, with
C<$private_key>, which must be a bytestring of length C<32>. Returns
a hash reference containing the recoverable signature.

C<$message> is first hashed with double SHA256 (known as HASH256 in Bitcoin)
before passing it to signing algorithm (which expects length C<32> bytestrings).

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

This method always produces deterministic signatures suitable for use in
recoverable signature systems.

=head3 sign_digest

	$signature = $secp256k1->sign_digest($private_key, $message_digest)

Same as L</sign_message>, but it does not perform double SHA256 on its input.
Because of that, C<$message_digest> must be a bytestring of length C<32>.

=head3 sign_digest_schnorr

	$signature = $secp256k1->sign_digest_schnorr($private_key, $message_digest)

Same as L</sign_message_schnorr>, but it does not perform SHA256 on its input.
While Schnorr allows any length message, this method requires
C<$message_digest> to be a bytestring of length C<32>.

=head3 sign_digest_recoverable

	$signature = $secp256k1->sign_digest_recoverable($private_key, $message_digest)

Same as L</sign_message_recoverable>, but it does not perform double SHA256 on its input.
Because of that, C<$message_digest> must be a bytestring of length C<32>.

Returns the same hash reference format as L</sign_message_recoverable>.

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN


	$xonly_public_key = $secp256k1->xonly_public_key($public_key)

Returns a xonly form of C<$public_key>. This form is used in Taproot.

=head3 negate_private_key

	$negated_private_key = $secp256k1->negate_private_key($private_key)

Negates a private key and returns it.

=head3 negate_public_key

	$negated_public_key = $secp256k1->negate_public_key($public_key)

Negates a public key and returns it.

=head3 add_private_key

	$tweaked = $secp256k1->add_private_key($private_key, $tweak)

Add a C<$tweak> (bytestring of length C<32>) to C<$private_key> (bytestring of
length C<32>). The result is a bytestring containing tweaked private key.

If the arguments or the resulting key are not valid, an exception will be thrown.

=head3 add_public_key

lib/Bitcoin/Secp256k1.pm  view on Meta::CPAN

compressed or uncompressed public key). The result is a bytestring containing
tweaked public key in compressed form.

If the arguments or the resulting key are not valid, an exception will be thrown.

=head3 multiply_private_key

	$tweaked = $secp256k1->multiply_private_key($private_key, $tweak)

Same as L</add_private_key>, but performs multiplication instead of addition.

=head3 multiply_public_key

	$tweaked = $secp256k1->multiply_public_key($public_key, $tweak)

 view all matches for this distribution


Blockchain-Ethereum-Keystore

 view release on metacpan or  search on metacpan

lib/Blockchain/Ethereum/Keystore.pm  view on Meta::CPAN

        ...
    );

    my $keyfile = Blockchain::Ethereum::Keystore::Keyfile->new;
    $keyfile->import_file("...");
    $keyfile->private_key->sign_transaction($transaction);

Export private key:

    my $keyfile = Blockchain::Ethereum::Keystore::Keyfile->new;
    $keyfile->import_file("...");

    # private key bytes
    print $keyfile->private_key->export;

=head1 OVERVIEW

This module provides a collection of Ethereum wallet management utilities.

 view all matches for this distribution


Blockchain-Ethereum-Transaction

 view release on metacpan or  search on metacpan

lib/Blockchain/Ethereum/Transaction.pm  view on Meta::CPAN

        chain_id                 => '0x539'
    );

    # github.com/refeco/perl-ethereum-keystore
    my $key = Blockchain::Ethereum::Keystore::Key->new(
        private_key => pack "H*",
        '4646464646464646464646464646464646464646464646464646464646464646'
    );

    $key->sign_transaction($transaction);

 view all matches for this distribution


Blockchain-Ethereum

 view release on metacpan or  search on metacpan

examples/address_creation.pl  view on Meta::CPAN

my $key = Blockchain::Ethereum::Key->new();
printf "%s\n", $key->address;

# importing private key
$key = Blockchain::Ethereum::Key->new(
    private_key => pack "H*",
    '4646464646464646464646464646464646464646464646464646464646464646'
);
printf "%s\n", $key->address;

# hdwallet

 view all matches for this distribution


Business-OnlinePayment-BitPay-KeyUtils

 view release on metacpan or  search on metacpan

key_utils.c  view on Meta::CPAN


    const char *cPem = pemstring;
    in = BIO_new(BIO_s_mem());
    BIO_puts(in, cPem);
    key = PEM_read_bio_ECPrivateKey(in, NULL, NULL, NULL);
    res = EC_KEY_get0_private_key(key);
    eckey = EC_KEY_new_by_curve_name(NID_secp256k1);
    group = EC_KEY_get0_group(eckey);
    pub_key = EC_POINT_new(group);

    EC_KEY_set_private_key(eckey, res);

    if (!EC_POINT_mul(group, pub_key, res, NULL, NULL, ctx)) {
        return ERROR;
    }

 view all matches for this distribution


Business-OnlinePayment-Braintree

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/Braintree.pm  view on Meta::CPAN

    use Business::OnlinePayment;

    $tx = new Business::OnlinePayment('Braintree',
                                      merchant_id => 'your merchant id',
                                      public_key => 'your public key',
                                      private_key => 'your private key',
                                     );

    $tx->test_transaction(1); # sandbox transaction for development and tests
  
    $tx->content(amount => 100,

lib/Business/OnlinePayment/Braintree.pm  view on Meta::CPAN


    $self->build_subs(qw(card_token));

    $config->merchant_id($opts{merchant_id});
    $config->public_key($opts{public_key});
    $config->private_key($opts{private_key});

    return;
}

=head1 AUTHOR

 view all matches for this distribution


Business-OnlinePayment-CardFortress

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/CardFortress.pm  view on Meta::CPAN

  $self->port('443') unless $self->port;
  $self->path('/bop/index.html') unless $self->path;

  $self->build_subs(qw( order_number avs_code cvv2_response
                        response_page response_code response_headers
                        card_token private_key txn_date
                   ));
}

sub submit {
  my $self = shift;

lib/Business/OnlinePayment/CardFortress.pm  view on Meta::CPAN

  # response_page()

  #handle the challenge/response handshake
  if ( $self->error_message eq '_challenge' ) { #XXX infinite loop protection?

    my $private_key = $self->private_key
      or die "no private key available";

    $private_key = read_file($private_key)
      if $private_key !~ /-----BEGIN/ && -r $private_key;

    #decrypt the challenge with the private key
    my $challenge = decode_base64($response{'card_challenge'});

    #here is the hardest part to implement at each client side
    my $rsa_priv = Crypt::OpenSSL::RSA->new_private_key($private_key);
    my $response = $rsa_priv->decrypt($challenge);

    #try the transaction again with the challenge response
    # (B:OP could sure use a better way to alter one value)
    my %content = $self->content;

lib/Business/OnlinePayment/CardFortress.pm  view on Meta::CPAN

  my $tx = new Business::OnlinePayment(
    'CardFortress',
      'gateway'          => 'ProcessingGateway',
      'gateway_login'    => 'gwlogin',
      'gateway_password' => 'gwpass',
      #private_key not necessary
  );

  $tx->content(
      type           => 'VISA',
      login          => 'cardfortress_login',

lib/Business/OnlinePayment/CardFortress.pm  view on Meta::CPAN

  my $rx = new Business::OnlinePayment(
    'CardFortress',
      'gateway'          => 'ProcessingGateway',
      'gateway_login'    => 'gwlogin',
      'gateway_password' => 'gwpass',
      'private_key'      => $private_key_string, #or filename
      'bop_options'      => join('/', map "$_=".$options{$_}, keys %options),
  );

  $rx->content(
      type           => 'VISA',

 view all matches for this distribution


Business-OnlinePayment-StoredTransaction

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/StoredTransaction/Unstore.pm  view on Meta::CPAN

our @EXPORT = ();

our $VERSION = '0.01';

#takes private RSA key and string returned by StoredTransaction->authorization
#takes arguments (private_key => $privkey, authorization => $auth)
sub new {
    my $invocant = shift;
    my $class = ref($invocant) || $invocant;
    my $self = {
        @_,
    };
    bless $self, $class;

    croak "missing 'private_key'" unless $self->{'private_key'};
    my $privkey = $self->{'private_key'};
    croak "missing 'authorization'" unless $self->{'authorization'};
    croak "bad authorization" unless $self->{'authorization'} =~ /:/;
    my ($seckey, $ciphertext) = split /:/, $self->{'authorization'};
    $seckey = decode_base64($seckey);
    $ciphertext = decode_base64($ciphertext);
    my $rsa_priv;
    eval {$rsa_priv = Crypt::OpenSSL::RSA->new_private_key($privkey)};
    croak $@ if $@;
    eval {$seckey = $rsa_priv->decrypt($seckey)};
    croak $@ if $@;
    my $cipher = Crypt::CBC->new( {'key' => $seckey,
                                   'cipher' => 'Blowfish',

lib/Business/OnlinePayment/StoredTransaction/Unstore.pm  view on Meta::CPAN


=head1 SYNOPSIS

  use Business::OnlinePayment::StoredTransaction::Unstore;
  my $bitz = Business::OnlinePayment::StoredTransaction::Unstore->new(
      private_key => '-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDqCih9AmZurFhxoOEsoIpL7wHnA0vi8eopVGfJiFSXldnemIxC
UY8tdk0hXSUwtEogQ2yeFB8+Wsl4S0oStFb2kGPrH2cDF9UjWTWFMjvE+4GO0Asz  
q3Ek0gnAQazVs89AjFlDuaDiCGHryhIprbA7wbZVWmCQKyXcCavSgf0Y0QIDAP//
AoGABlQEpEXw4vbz6yZwvRGkTunpSxRV5ZzIHZ4x3JjYQmGDoZRpf0SLz5p+eGFp
HtY+x1YaCfA9OIDU62GUhk3+l+QIuhjV0/2cnAQ8x81r82zmbioWcmkAyLYKrkgS

 view all matches for this distribution


Business-TrueLayer

 view release on metacpan or  search on metacpan

lib/Business/TrueLayer.pm  view on Meta::CPAN


        # required constructor arguments
        client_id     => $truelayer_client_id,
        client_secret => $truelauer_client_secret,
        kid           => $truelayer_kid,
        private_key   => '/path/to/private/key',

        # optional constructor arguments (with defaults)
        host          => 'truelayer.com',
        api_host      => 'api.truelayer.com',
        auth_host     => 'auth.truelayer.com',

 view all matches for this distribution



CPAN-Testers-API

 view release on metacpan or  search on metacpan

Rexfile  view on Meta::CPAN


#######################################################################
# Settings

user 'cpantesters';
private_key '~/.ssh/cpantesters-rex';

# Used to find local, dev copies of the dist
set 'dist_name' => 'CPAN-Testers-API';

#######################################################################

 view all matches for this distribution


CPAN-Testers-Backend

 view release on metacpan or  search on metacpan

Rexfile  view on Meta::CPAN


#######################################################################
# Settings

user 'cpantesters';
private_key '~/.ssh/cpantesters-rex';

# Used to find local, dev copies of the dist
set 'dist_name' => 'CPAN-Testers-Backend';

#######################################################################

 view all matches for this distribution


CPAN-Testers-Metabase-AWS

 view release on metacpan or  search on metacpan

t/config/profiles.conf  view on Meta::CPAN

default = cpantesters
[cpantesters]
access_key_id = XXXXXXXXXXXXXXXXXXXX
secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
certificate_file = my-cert.pem
private_key_file = my-key.pem
ec2_keypair_name = my-ec2-keypair
ec2_keypair_file = ec2-private-key.pem
aws_account_id = 0123-4567-8901
canonical_user_id = 64-character-string

 view all matches for this distribution


CPAN-Testers-Schema

 view release on metacpan or  search on metacpan

Rexfile  view on Meta::CPAN


#######################################################################
# Settings

user 'cpantesters';
private_key '~/.ssh/cpantesters-rex';

# Used to find local, dev copies of the dist
set 'dist_name' => 'CPAN-Testers-Schema';

#######################################################################

 view all matches for this distribution


Captcha-NocaptchaMailru

 view release on metacpan or  search on metacpan

lib/Captcha/NocaptchaMailru.pm  view on Meta::CPAN

    return join('&', @pairs);
}

sub _generate_check_url {
    my ($key, $id, $val) = @_;
    return API_SERVER . '/check?' . _pack_params({'private_key' => $key,
                                                  'captcha_id' => $id,
                                                  'captcha_value' => $val});
}

sub check_detailed {

 view all matches for this distribution


Captcha-reCaptcha

 view release on metacpan or  search on metacpan

lib/Captcha/reCAPTCHA.pm  view on Meta::CPAN


    # Version 1 (not recommended)
    print $c->get_html( 'your public key here' );

    # Verify submission
    my $result $c->check_answer_v2($private_key, $response, $ENV{REMOTE_ADDR});

    # Verify submission (Old Version)
    my $result = $c->check_answer(
        'your private key here', $ENV{'REMOTE_ADDR'},
        $challenge, $response

 view all matches for this distribution


Catalyst-Model-WebService-MyGengo

 view release on metacpan or  search on metacpan

lib/Catalyst/Model/WebService/MyGengo.pm  view on Meta::CPAN

    use parent qw( Catalyst::Model::WebService::MyGengo );
    
    __PACKAGE__->config({
        class           => 'WebService::MyGengo::Client'
        , public_key    => 'your API public key'
        , private_key   => 'your API private key'
        , use_sandbox   => 0    # Whether to use the production site or the sandbox
        # See WebService::MyGengo::Client for other options
        });
    
    1;

lib/Catalyst/Model/WebService/MyGengo.pm  view on Meta::CPAN

characters in your keys (eg \#) ):

    <Model::MyGengo>
        class           WebService::MyGengo::Client
        public_key      my-sandbox-pubkey
        private_key     my-sandbox-privkey
        use_sandbox     1
    </Model::MyGengo>

Then, in a controller:

 view all matches for this distribution


Catalyst-Plugin-OpenIDConnect

 view release on metacpan or  search on metacpan

example/app.pl  view on Meta::CPAN

    
    # OpenID Connect configuration
    'Plugin::OpenIDConnect' => {
        issuer => {
            url                => 'http://localhost:5000',
            private_key_file   => 'example/keys/private.pem',
            public_key_file    => 'example/keys/public.pem',
            key_id             => 'example-key-1',
        },
        
        # Client configurations

 view all matches for this distribution


Catalyst-View-APNS

 view release on metacpan or  search on metacpan

lib/Catalyst/View/APNS.pm  view on Meta::CPAN

use Data::Dumper;
use Carp;
use Catalyst::Exception;
our $VERSION = '0.01';

__PACKAGE__->mk_accessors(qw(apns cv certification private_key passwd));

sub new {
    my ( $class, $c, $arguments ) = @_;
    my $self = $class->next::method($c);

lib/Catalyst/View/APNS.pm  view on Meta::CPAN

        }
    }
    unless ( $self->certification ) {
        croak "Invalied certification";
    }
    unless ( $self->private_key ) {
        croak "Invalied private_key";
    }
    return $self;
}

sub process {
    my ( $self, $c ) = @_;
    my $apns   = Net::APNS->new;
    my $notify = $apns->notify(
        {
            cert => $self->certification,
            key  => $self->private_key,
        }
    );
    if ( $self->passwd ) {
        $notify->passwd( $self->passwd );
    }

lib/Catalyst/View/APNS.pm  view on Meta::CPAN

# Configure in lib/MyApp.pm
MyApp->config(
    {
        apns => {
            certification => cert    #require to specify
              private_key => key     #require to specify
        }
    }
);

sub hello : Local {

 view all matches for this distribution


Chef-REST-Client

 view release on metacpan or  search on metacpan

lib/Chef.pm  view on Meta::CPAN

    my ($self,$hosted_chef) = (@_);
       $self->{ 'HOSTED_CHEF_' } = $hosted_chef if defined $server;;
    return $self->{ 'HOSTED_CHEF' };
  }
  
  sub private_key {
    my ($self,$private_key) = (@_);
           $self->{ 'CHEF_CLIENT_PRIVATE_KEY' } = $private_key if defined $private_key;
    return $self->{ 'CHEF_CLIENT_PRIVATE_KEY' };
  }
}#nwe

__DATA__

 view all matches for this distribution


Class-Struct-FIELDS

 view release on metacpan or  search on metacpan

FIELDS.pm  view on Meta::CPAN

Fields starting with a leading underscore, C<_>, are private: they are
still valid fields, but C<Class::Struct::FIELDS> does not create
subroutines to access them.  Instead, you should access them the usual
way for hash members:

    $self->{_private_key}; # ok
    $self->_private_key; # Compilation error

See L<fields> for more details.

=head2 Extra magic: auto-stringify

 view all matches for this distribution


CloudCron

 view release on metacpan or  search on metacpan

t/crontab  view on Meta::CPAN

#
# Tplanas daily provision workfacts report
45 23 * * 1-5 bash -c /opt/deploy/code/portal/script/report_daily_provision_workfacts.pl

## Import CAPSiDE aliases to show in portal.capside.com
#3-59/10 * * * * /usr/bin/scp -i /home/portal/ialonso/private_key/portal.key portal@n020125.sys.capside.net:/home/portal/output.file /home/portal/ialonso/output.file
#

# CAPSiDE Ops Team Almighty Ticket Dispatching Tool (tm)
0,15,30,45 * * * 1-5 bash -c /opt/deploy/code/portal/script/dispatcher_unclassified_tickets
5 14 * * 1-5 bash -c /opt/deploy/code/portal/script/dispatcher_backup_patching_tickets

 view all matches for this distribution


Convert-ASN1

 view release on metacpan or  search on metacpan

examples/tsa3161  view on Meta::CPAN

	open TSAKEY, "<$filename" or &dieif(1,"cannot open TSAKeyFile '$filename'");
	binmode TSAKEY;
        my $tsa_key_pem;
	read TSAKEY, $tsa_key_pem, $size;  
	close TSAKEY;
        $tsa_key = Crypt::OpenSSL::RSA->new_private_key($tsa_key_pem) or &dieif(1,"TSAKeyFile '$filename' cannot be decoded");
  }

# some magic
my $time = Time::HiRes::gettimeofday() ;
my $now = int($time);

 view all matches for this distribution


Convert-Pheno

 view release on metacpan or  search on metacpan

lib/Convert/Pheno/BFF/ToPXF.pm  view on Meta::CPAN


    #######################################
    # END MAPPING TO PHENOPACKET V2 TERMS #
    #######################################

    _strip_private_keys($pxf);

    return $pxf;
}

sub _map_id {

lib/Convert/Pheno/BFF/ToPXF.pm  view on Meta::CPAN

    }

    return $data;
}

sub _strip_private_keys {
    my ($data) = @_;
    return unless defined $data;

    if ( ref($data) eq 'HASH' ) {
        for my $key ( keys %{$data} ) {
            if ( $key =~ /^_/ ) {
                delete $data->{$key};
                next;
            }
            _strip_private_keys( $data->{$key} );
        }
        return;
    }

    if ( ref($data) eq 'ARRAY' ) {
        _strip_private_keys($_) for @{$data};
        return;
    }

    return;
}

 view all matches for this distribution


Crypt-Bear

 view release on metacpan or  search on metacpan

lib/Crypt/Bear/EC/PrivateKey.pm  view on Meta::CPAN


version 0.004

=head1 SYNOPSIS

my $private_key = Crypt::Bear::EC::PrivateKey->generate('secp256r1', $prng);
my $signature = $private_key->ecdsa_sign('sha256', $hash);
my $shared = $private_key->ecdh_key_exchange($some_public_key);

=head1 DESCRIPTION

This represents a elliptic curve private key. The curve type can be one of the following:

 view all matches for this distribution


Crypt-Cryptoki

 view release on metacpan or  search on metacpan

t/cryptoki.t  view on Meta::CPAN

	unwrap => 1,
	label => 'test',
	id => pack('C*', 0x01, 0x02, 0x03)
);

my ( $public_key, $private_key ) = $session->generate_key_pair($t_public,$t_private);

try {
	my $plain_text = 'plain text';
	my ( $encrypted_text_ref, $len ) = $public_key->encrypt(\$plain_text, length($plain_text));

	( $encrypted_text_ref ) = $private_key->decrypt($encrypted_text_ref, $len);
	diag $$encrypted_text_ref;

	diag explain $public_key->get_attributes(1);
	diag $public_key->export_as_string;

	diag explain $private_key->get_attributes(1);

} catch { diag $_; 0 };

ok $public_key->destroy;
ok $private_key->destroy;

done_testing();

 view all matches for this distribution


( run in 5.155 seconds using v1.01-cache-2.11-cpan-8379b9b8ec2 )