Result:
found 296 distributions and 1081 files matching your query ! ( run in 1.601 )


Daje-Plugin-Tools

 view release on metacpan or  search on metacpan

_Deparsed_XSubs.pm  view on Meta::CPAN

sub check_key;
sub decrypt;
sub encrypt;
sub generate_key;
sub get_key_parameters;
sub get_private_key_string;
sub get_public_key_string;
sub get_public_key_x509_string;
sub import_random_seed;
sub is_private;
sub new_key_from_parameters;
sub new_private_key;
sub new_public_key;
sub private_encrypt;
sub public_decrypt;
sub sign;
sub size;

_Deparsed_XSubs.pm  view on Meta::CPAN

sub COMP_add_compression_method($$) ;
sub CTX_add_client_CA($$) ;
sub CTX_add_extra_chain_cert($$) ;
sub CTX_add_session($$) ;
sub CTX_callback_ctrl($$$) ;
sub CTX_check_private_key($) ;
sub CTX_ctrl($$$$) ;
sub CTX_flush_sessions($$) ;
sub CTX_free($) ;
sub CTX_get0_param($) ;
sub CTX_get_app_data($) ;

_Deparsed_XSubs.pm  view on Meta::CPAN

sub alert_desc_string($) ;
sub alert_desc_string_long($) ;
sub alert_type_string($) ;
sub alert_type_string_long($) ;
sub callback_ctrl($$$) ;
sub check_private_key($) ;
sub clear($) ;
sub clear_num_renegotiations($) ;
sub client_hello_get0_ciphers($) ;
sub client_hello_get0_compression_methods($) ;
sub client_hello_get0_ext($$) ;

 view all matches for this distribution


Dancer-Plugin-reCAPTCHA

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/reCAPTCHA.pm  view on Meta::CPAN


register recaptcha_check => sub {
    my ( $response ) = @_;
    my $conf = plugin_setting();
    return $rc->verify(
        $conf->{ private_key },
        $response,
        request->remote_address,
    );
};

lib/Dancer/Plugin/reCAPTCHA.pm  view on Meta::CPAN


    # In your config.yml 
    plugins: 
        reCAPTCHA: 
            public_key: "public key goes here" 
            private_key: "private key goes here" 
            theme: "dark"
            type: "image"
            size: "normal"

    # In your Dancer app...

 view all matches for this distribution


Dancer

 view release on metacpan or  search on metacpan

lib/Dancer/Error.pm  view on Meta::CPAN

    my $censored = 0;
    for my $key (keys %$hash) {
        if (ref $hash->{$key} eq 'HASH') {
            $censored += _censor( $hash->{$key}, $recursecount );
        }
        elsif ($key =~ /(pass|card?num|pan|cvv2?|ccv|secret|private_key|cookie_key)/i) {
            $hash->{$key} = "Hidden (looks potentially sensitive)";
            $censored++;
        }
    }

 view all matches for this distribution


Data-Censor

 view release on metacpan or  search on metacpan

lib/Data/Censor.pm  view on Meta::CPAN

        };
    } else {
        $self->{is_sensitive_field} = {
            map { $_ => 1 } qw(
              pass         password     old_password   secret
              private_key  cardnum      card_number    pan
              cvv          cvv2         ccv
            )
        };
    }

 view all matches for this distribution


Database-Cassandra-Client

 view release on metacpan or  search on metacpan

Client.pm  view on Meta::CPAN

Set client-side certificate chain. This is used to authenticate the client on the server-side. This should contain the entire Certificate chain starting with the certificate itself. 

Return: CASS_OK if successful, otherwise an error occurred


=head3 ssl_set_private_key

 my $int_CassError = $cass->ssl_set_private_key($ssl, $key, $password);

Set client-side private key. This is used to authenticate the client on the server-side. 

Return: CASS_OK if successful, otherwise an error occurred

 view all matches for this distribution


Devel-Scooby

 view release on metacpan or  search on metacpan

Scooby.pm  view on Meta::CPAN

            # Use the PK- of this Mobile::Executive invocation to 
            # sign the encrypted mobile agent.

            my $cypher_signature = $rsa->sign(
                                       Message  => $cyphertext,
                                       Key      => $Mobile::Executive::private_key,
                                       Armour   => $TRUE
                                   ) or die $rsa->errstr, "\n";

            # Networking code to send agent to the server starts here.

 view all matches for this distribution


Docker-Registry

 view release on metacpan or  search on metacpan

examples/gce_sa_explicit.pl  view on Meta::CPAN

#the repositories, but you can see the tags of a repo if you know its name
my $repo = $ARGV[0];

my $sa = Docker::Registry::Auth::GCEServiceAccount->new(
  client_email => $ce,
  private_key => $pk,
);

my $r = Docker::Registry::GCE->new(
  auth => $sa,
);

 view all matches for this distribution


Domain-Details

 view release on metacpan or  search on metacpan

_Deparsed_XSubs.pm  view on Meta::CPAN

sub COMP_add_compression_method($$) ;
sub CTX_add_client_CA($$) ;
sub CTX_add_extra_chain_cert($$) ;
sub CTX_add_session($$) ;
sub CTX_callback_ctrl($$$) ;
sub CTX_check_private_key($) ;
sub CTX_ctrl($$$$) ;
sub CTX_flush_sessions($$) ;
sub CTX_free($) ;
sub CTX_get0_param($) ;
sub CTX_get_app_data($) ;

_Deparsed_XSubs.pm  view on Meta::CPAN

sub alert_desc_string($) ;
sub alert_desc_string_long($) ;
sub alert_type_string($) ;
sub alert_type_string_long($) ;
sub callback_ctrl($$$) ;
sub check_private_key($) ;
sub clear($) ;
sub clear_num_renegotiations($) ;
sub client_version($) ;
sub connect($) ;
sub constant($) ;

 view all matches for this distribution


EAI-Wrap

 view release on metacpan or  search on metacpan

lib/EAI/Wrap.pm  view on Meta::CPAN


    # site.config
    %config = (
    	sensitive => {
    			dbSys => {user => "DBuser", pwd => "DBPwd"},
    			ftpSystem1 => {user => "FTPuser", pwd => "FTPPwd", privKey => 'path_to_private_key', hostkey =>'hostkey'},
    		},
    	checkLookup => {"task_script.pl" => {errmailaddress => "test\@test.com", errmailsubject => "testjob failed", timeToCheck => "0800", freqToCheck => "B", logFileToCheck => "test.log", logcheck => "started.*"}},
    	executeOnInit => sub {$execute{addToScriptName} = "doWhateverHereToModifySettings";},
    	folderEnvironmentMapping => {Test => "Test", Dev => "Dev", "" => "Prod"},
    	errmailaddress => 'your@mail.address',

lib/EAI/Wrap.pm  view on Meta::CPAN

    	FTP => {
    		remoteHost => {"Prod" => "ftp.com", "Test" => "ftp-test.com"},
    		remoteDir => "/reports",
    		port => 22,
    		user => "myuser",
    		privKey => 'C:/keystore/my_private_key.ppk',
    		FTPdebugLevel => 0, # ~(1|2|4|8|16|1024|2048)
    	},
    	DB => {
    		tablename => "ValueTable",
    		deleteBeforeInsertSelector => "rptDate = ?",

 view all matches for this distribution


EV-Hiredis

 view release on metacpan or  search on metacpan

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

/* Options to create an OpenSSL context. */
typedef struct {
    const char *cacert_filename;
    const char *capath;
    const char *cert_filename;
    const char *private_key_filename;
    const char *server_name;
    int verify_mode;
} redisSSLOptions;

/**

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * and use for validation.
 *
 * capath is an optional directory path where trusted CA certificate files are
 * stored in an OpenSSL-compatible structure.
 *
 * cert_filename and private_key_filename are optional names of a client side
 * certificate and private key files to use for authentication. They need to
 * be both specified or omitted.
 *
 * server_name is an optional and will be used as a server name indication
 * (SNI) TLS extension.

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * If error is non-null, it will be populated in case the context creation fails
 * (returning a NULL).
 */

redisSSLContext *redisCreateSSLContext(const char *cacert_filename, const char *capath,
        const char *cert_filename, const char *private_key_filename,
        const char *server_name, redisSSLContextError *error);

/**
  * Helper function to initialize an OpenSSL context that can be used
  * to initiate SSL connections. This is a more extensible version of redisCreateSSLContext().

 view all matches for this distribution


EV-Nats

 view release on metacpan or  search on metacpan

src/EV__Nats.xs  view on Meta::CPAN

    uint16_t actual_crc = nats_crc16(raw, raw_len - 2);
    if (expected_crc != actual_crc) return -1;

    unsigned char *seed = raw + 2;

    EVP_PKEY *pkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL, seed, 32);
    if (!pkey) return -1;

    EVP_MD_CTX *ctx = EVP_MD_CTX_new();
    if (!ctx) { EVP_PKEY_free(pkey); return -1; }

src/EV__Nats.xs  view on Meta::CPAN

    uint16_t expected_crc = (uint16_t)raw[raw_len - 2] | ((uint16_t)raw[raw_len - 1] << 8);
    if (nats_crc16(raw, raw_len - 2) != expected_crc) return -1;

    unsigned char *seed = raw + 2;

    EVP_PKEY *pkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL, seed, 32);
    if (!pkey) return -1;

    unsigned char pub[32];
    size_t pub_len = 32;
    int ok = EVP_PKEY_get_raw_public_key(pkey, pub, &pub_len) == 1;

 view all matches for this distribution


EV-Redis

 view release on metacpan or  search on metacpan

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

/* Options to create an OpenSSL context. */
typedef struct {
    const char *cacert_filename;
    const char *capath;
    const char *cert_filename;
    const char *private_key_filename;
    const char *server_name;
    int verify_mode;
} redisSSLOptions;

/**

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * and use for validation.
 *
 * capath is an optional directory path where trusted CA certificate files are
 * stored in an OpenSSL-compatible structure.
 *
 * cert_filename and private_key_filename are optional names of a client side
 * certificate and private key files to use for authentication. They need to
 * be both specified or omitted.
 *
 * server_name is an optional and will be used as a server name indication
 * (SNI) TLS extension.

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * If error is non-null, it will be populated in case the context creation fails
 * (returning a NULL).
 */

redisSSLContext *redisCreateSSLContext(const char *cacert_filename, const char *capath,
        const char *cert_filename, const char *private_key_filename,
        const char *server_name, redisSSLContextError *error);

/**
  * Helper function to initialize an OpenSSL context that can be used
  * to initiate SSL connections. This is a more extensible version of redisCreateSSLContext().

 view all matches for this distribution


EV-Websockets

 view release on metacpan or  search on metacpan

Websockets.xs  view on Meta::CPAN

        info.http_proxy_port = proxy_port;
    }

    if (ssl_cert && strlen(ssl_cert) > 0) {
        info.ssl_cert_filepath = ssl_cert;
        info.ssl_private_key_filepath = ssl_key;
        if (ssl_ca && strlen(ssl_ca) > 0)
            info.ssl_ca_filepath = ssl_ca;
    }

    DEBUG_LOG("Creating context (manual integration)");

Websockets.xs  view on Meta::CPAN

    info.user = srv;
    info.options = 0;

    if (ssl_cert && ssl_key) {
        info.ssl_cert_filepath = ssl_cert;
        info.ssl_private_key_filepath = ssl_key;
        if (ssl_ca)
            info.ssl_ca_filepath = ssl_ca;
        info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
    }

 view all matches for this distribution


Experian-IDAuth

 view release on metacpan or  search on metacpan

lib/Experian/IDAuth.pm  view on Meta::CPAN

sub defaults {
    my $self = shift;
    return (
        username      => 'experian_user',
        password      => '?',
        private_key   => 'private_key',
        public_key    => 'public_key',
        members_url   => 'https://proveid.experian.com',
        api_uri       => 'http://corpwsdl.oneninetwo',
        api_proxy     => 'https://xml.proveid.experian.com/IDSearch.cfc',
        header_ns_url => 'http://xml.proveid.experian.com/xsd/Headers',

lib/Experian/IDAuth.pm  view on Meta::CPAN

sub _2fa_header {
    my $self = shift;

    my $loginid     = $self->{username};
    my $password    = $self->{password};
    my $private_key = $self->{private_key};
    my $public_key  = $self->{public_key};

    my $timestamp = time();

    my $hash = hmac_sha256_base64($loginid, $password, $timestamp, $private_key);

    # Digest::SHA doesn't pad it's outputs so we have to do it manually.
    while (length($hash) % 4) {
        $hash .= '=';
    }

 view all matches for this distribution


Ezmlm

 view release on metacpan or  search on metacpan

Ezmlm/GpgKeyRing.pm  view on Meta::CPAN


Refer to the documentation of gnupg for the format of the arguments.

=cut

sub generate_private_key {
	my ($self, $name, $comment, $email, $keysize, $expire) = @_;
	my $gpg = $self->_get_gpg_object();
	my $gpgoption = "--gen-key";
	my $gpgcommand = $gpg->gpgbin() . " " . $gpg->gpgopts() . " $gpgoption";
	my $pid = open(INPUT, "| $gpgcommand");

Ezmlm/GpgKeyRing.pm  view on Meta::CPAN

	my @keys = $self->_get_keys("pub");
	return @keys;
}


# == get_private_keys ==
# see above for POD (get_public_keys)
sub get_secret_keys {
	my ($self) = @_;
	my @keys = $self->_get_keys("sec");
	return @keys;

 view all matches for this distribution


FIDO-Raw

 view release on metacpan or  search on metacpan

deps/libfido2/src/es256.c  view on Meta::CPAN

		fido_log_debug("%s: EVP_PKEY_keygen", __func__);
		goto fail;
	}

	if ((ec = EVP_PKEY_get0_EC_KEY(k)) == NULL ||
	    (d = EC_KEY_get0_private_key(ec)) == NULL ||
	    (n = BN_num_bytes(d)) < 0 || (size_t)n > sizeof(key->d) ||
	    (n = BN_bn2bin(d, key->d)) < 0 || (size_t)n > sizeof(key->d)) {
		fido_log_debug("%s: EC_KEY_get0_private_key", __func__);
		goto fail;
	}

	ok = 0;
fail:

deps/libfido2/src/es256.c  view on Meta::CPAN

		fido_log_debug("%s: BN_bin2bn", __func__);
		goto fail;
	}

	if ((ec = EC_KEY_new_by_curve_name(nid)) == NULL ||
	    EC_KEY_set_private_key(ec, d) == 0) {
		fido_log_debug("%s: EC_KEY_set_private_key", __func__);
		goto fail;
	}

	if ((pkey = EVP_PKEY_new()) == NULL ||
	    EVP_PKEY_assign_EC_KEY(pkey, ec) == 0) {

 view all matches for this distribution


File-KDBX-XS

 view release on metacpan or  search on metacpan

libtomcrypt/src/headers/tomcrypt_pk.h  view on Meta::CPAN

int dh_set_pg_groupsize(int groupsize, dh_key *key);

int dh_set_key(const unsigned char *in, unsigned long inlen, int type, dh_key *key);
int dh_generate_key(prng_state *prng, int wprng, dh_key *key);

int dh_shared_secret(const dh_key  *private_key, const dh_key  *public_key,
                     unsigned char *out,         unsigned long *outlen);

void dh_free(dh_key *key);

int dh_export_key(void *out, unsigned long *outlen, int type, const dh_key *key);

libtomcrypt/src/headers/tomcrypt_pk.h  view on Meta::CPAN

int ecc_export_openssl(unsigned char *out, unsigned long *outlen, int type, const ecc_key *key);
int ecc_import_openssl(const unsigned char *in, unsigned long inlen, ecc_key *key);
int ecc_import_pkcs8(const unsigned char *in, unsigned long inlen, const void *pwd, unsigned long pwdlen, ecc_key *key);
int ecc_import_x509(const unsigned char *in, unsigned long inlen, ecc_key *key);

int  ecc_shared_secret(const ecc_key *private_key, const ecc_key *public_key,
                       unsigned char *out, unsigned long *outlen);

int  ecc_encrypt_key(const unsigned char *in,   unsigned long inlen,
                           unsigned char *out,  unsigned long *outlen,
                           prng_state *prng, int wprng, int hash,

libtomcrypt/src/headers/tomcrypt_pk.h  view on Meta::CPAN

                                  const void *pwd, unsigned long pwdlen,
                              curve25519_key *key);

int ed25519_sign(const unsigned char  *msg, unsigned long msglen,
                       unsigned char  *sig, unsigned long *siglen,
                 const curve25519_key *private_key);

int ed25519_verify(const  unsigned char *msg, unsigned long msglen,
                   const  unsigned char *sig, unsigned long siglen,
                   int *stat, const curve25519_key *public_key);

libtomcrypt/src/headers/tomcrypt_pk.h  view on Meta::CPAN

int x25519_import_x509(const unsigned char *in, unsigned long inlen, curve25519_key *key);
int x25519_import_pkcs8(const unsigned char *in, unsigned long inlen,
                                 const void *pwd, unsigned long pwdlen,
                             curve25519_key *key);

int x25519_shared_secret(const curve25519_key *private_key,
                         const curve25519_key *public_key,
                                unsigned char *out, unsigned long *outlen);

#endif /* LTC_CURVE25519 */

libtomcrypt/src/headers/tomcrypt_pk.h  view on Meta::CPAN

                    const dsa_key       *key);

int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key);
int dsa_export(unsigned char *out, unsigned long *outlen, int type, const dsa_key *key);
int dsa_verify_key(const dsa_key *key, int *stat);
int dsa_shared_secret(void          *private_key, void *base,
                      const dsa_key *public_key,
                      unsigned char *out,         unsigned long *outlen);
#endif /* LTC_MDSA */

#ifdef LTC_DER

 view all matches for this distribution


Finance-Libdogecoin

 view release on metacpan or  search on metacpan

lib/Finance/Libdogecoin/FFI.pm  view on Meta::CPAN

is two strings in base-58 encoding. Do not share the private key. Do not lose
the private key.

The public key is a valid P2PKH address.

=head3 C<verify_key_pair( $private_key, $public_key, $is_testnet )>

The boolean C<$is_testnet> argument is optional; the default value is false.

Given two strings in base-58 encoding, returns a boolean value to indicate
whether the pair is valid for the given network.

lib/Finance/Libdogecoin/FFI.pm  view on Meta::CPAN


Generates and returns a private/public key hierarchical deterministic pair for
the network. The return value is two strings in base-58 encoding. Do not share
the private key. Do not lose the private key.

=head3 C<generate_derived_hd_pub_key( $master_private_key )>

Given a master key hierarchical deterministic key, derive and return a public
key associated with the master.

=head3 C<verify_master_priv_pub_keypair( $master_private_key, $master_public_key, $is_testnet )>

The boolean C<$is_testnet> argument is optional; the default value is false.

Given two strings representing hierarchical deterministic keys (a master
public key and a master private key) in base-58 encoding, returns a boolean

 view all matches for this distribution


Firefox-Marionette

 view release on metacpan or  search on metacpan

lib/Firefox/Marionette.pm  view on Meta::CPAN

    }
    if ( defined $parameters{user} ) {
        $parameters{user} =
          MIME::Base64::encode_base64url( $parameters{user} );
    }
    if ( !defined $parameters{private_key} ) {
        $parameters{private_key} = {};
    }
    if ( ref $parameters{private_key} eq 'HASH' ) {
        my $script = <<'_JS_';
let privateKeyArguments = {};
if (arguments[0]["name"]) {
  privateKeyArguments["name"] = arguments[0]["name"];
} else {

lib/Firefox/Marionette.pm  view on Meta::CPAN

  return urlSafeKey;
})();
return privateKey;
_JS_
        my $old = $self->_context('chrome');
        $parameters{private_key} = $self->script(
            $self->_compress_script($script),
            args => [ $parameters{private_key} ]
        );
        $self->_context($old);
    }
    if ( !defined $parameters{sign_count} ) {
        $parameters{sign_count} = 0;

lib/Firefox/Marionette.pm  view on Meta::CPAN

    my %credential_parameters = (
        authenticatorId      => $authenticator->id(),
        credentialId         => $parameters{id},
        isResidentCredential => $parameters{is_resident},
        rpId                 => $parameters{host},
        privateKey           => $parameters{private_key},
        signCount            => $parameters{sign_count},
        userHandle           => $parameters{user},
    );
    my $message_id = $self->_new_message_id();
    $self->_send_request(

lib/Firefox/Marionette.pm  view on Meta::CPAN


=item * id - contains the unique id for this credential, also known as the L<Credential ID|https://www.w3.org/TR/webauthn-2/#credential-id>.  If this is not supplied, one will be generated.

=item * is_resident - contains a boolean that if set to true, a L<client-side discoverable credential|https://w3c.github.io/webauthn/#client-side-discoverable-credential> is created. If set to false, a L<server-side credential|https://w3c.github.io/w...

=item * private_key - either a L<RFC5958|https://www.rfc-editor.org/rfc/rfc5958> encoded private key encoded using L<encode_base64url|MIME::Base64::encode_base64url> or a hash containing the following keys;

=over 8

=item * name - contains the name of the private key algorithm, such as "RSA-PSS" (the default), "RSASSA-PKCS1-v1_5", "ECDSA" or "ECDH".

lib/Firefox/Marionette.pm  view on Meta::CPAN


        $firefox->add_webauthn_credential(
                  id            => $credential->id(),
                  host          => $credential->host(),
                  user          => $credential->user(),
                  private_key   => $credential->private_key(),
                  is_resident   => $credential->is_resident(),
                  sign_count    => $credential->sign_count(),
                              );
    }
    $firefox->go('about:blank');

 view all matches for this distribution


FusionInventory-Agent

 view release on metacpan or  search on metacpan

resources/ssl/cnf/ca.cnf  view on Meta::CPAN

default_ca      = default_ca

[ default_ca ]
dir             = .
certificate     = $dir/crt/ca.pem
private_key     = $dir/key/ca.pem
certs           = $dir/crt              # Where the issued certs are kept
serial          = $dir/serial           # The current serial number
database        = $dir/index.txt        # database index file.

new_certs_dir   = $dir/new              # default place for new certs.

 view all matches for this distribution


Future-IO-TLS

 view release on metacpan or  search on metacpan

lib/Future/IO/TLS.pm  view on Meta::CPAN

	if (my $hostname = $options{hostname}) {
		$ssl->set_verify(Crypt::OpenSSL3::SSL::VERIFY_PEER);
		$ssl->set_tlsext_host_name($hostname);
		$ssl->set_host($hostname);
	}
	$ssl->use_PrivateKey_file($options{private_key_file}, Crypt::OpenSSL3::SSL::FILETYPE_PEM) if $options{private_key_file};
	$ssl->use_certificate_chain_file($options{certificate_chain_file}) if $options{certificate_chain_file};

	my $set_state_method = $options{server} ? 'set_accept_state' : 'set_connect_state';
	$ssl->$set_state_method;

lib/Future/IO/TLS.pm  view on Meta::CPAN


=item * hostname

The hostname of the other side of the connection. Typically used for client connections.

=item * private_key_file

The location of the private key file. Typically used for server connections.

=item * certificate_chain_file

lib/Future/IO/TLS.pm  view on Meta::CPAN


=head2 accept

 my $tls = Future::IO::TLS->accept($fh, $sockaddr, %options);

This combines C<< Future::IO->accept >> with C<< Future::IO::TLS->start_TLS >>. You probably want to pass this the C<private_key_file> and C<certificate_chain_file> arguments.

=head2 read

 my $data = await $io->read($fh, $size);

 view all matches for this distribution


GOOGLE-ADWORDS-PERL-CLIENT

 view release on metacpan or  search on metacpan

lib/Google/Ads/Common/OAuth2ServiceAccountsHandler.pm  view on Meta::CPAN

    \"iat\":${iat}
  }";

  my $encoded_header = __encode_base64_url($header);
  my $encoded_claims = __encode_base64_url($claims);
  my $key = $self->get___crypt_module()->new_private_key($file) || return 0;
  $key->use_pkcs1_padding();
  $key->use_sha256_hash();

  my $signature = $key->sign("${encoded_header}.${encoded_claims}");
  my $encoded_signature =  __encode_base64_url($signature);

 view all matches for this distribution


Game-Tibia-Packet

 view release on metacpan or  search on metacpan

lib/Game/Tibia/Packet/Login.pm  view on Meta::CPAN

sub import {
    (undef, %params) = (shift, %params, @_);
    die "Malformed Tibia version\n" if exists $params{tibia} && $params{tibia} !~ /^\d+$/;
}

my $otserv = Crypt::OpenSSL::RSA->new_private_key(
    do { local $/; open my $rsa, '<', dist_file('Game-Tibia-Packet', 'otserv.private') or die "Couldn't open private key $!"; <$rsa>; }
);

=head1 METHODS AND ARGUMENTS

lib/Game/Tibia/Packet/Login.pm  view on Meta::CPAN


    $self->{versions}{client} = Game::Tibia::Packet::version($self->{version});

    if ($self->{versions}{client}{rsa}) {
        if (defined $self->{rsa} and !blessed $self->{rsa}) {
            $self->{rsa} = Crypt::OpenSSL::RSA->new_private_key($self->{rsa});
        }
        $self->{rsa}->use_no_padding if defined $self->{rsa};
    }

    if (defined $self->{packet}) {

lib/Game/Tibia/Packet/Login.pm  view on Meta::CPAN

    $self->{rsa}->use_no_padding if defined $self->{rsa};
    $self->{versions}{client} = Game::Tibia::Packet::version $self->{versions}{client} unless ref $self->{versions}{client};

    my $payload = '';
    if ($self->{versions}{client}{rsa}) {
        $rsa = Crypt::OpenSSL::RSA->new_private_key($rsa) unless blessed $rsa;
        $rsa->size == 128
            or croak "Protocol $self->{versions}{client}{VERSION} expects 128 bit RSA key, but ${\($rsa->size*8)} bit were provided";
        $payload .= "\0";
    }

 view all matches for this distribution


Git-Hooks

 view release on metacpan or  search on metacpan

scripts/find-secret-leakage-in-git-diff.pl  view on Meta::CPAN

Sometimes you can't put the mark in the same line. Lines beginning private keys,
for example, do not have room for anything else. In these cases you can skip a
whole block marking its beginning and end like this:

  ## not a secret leak begin
  my $rsa_private_key = <<EOS;
  -----BEGIN RSA PRIVATE KEY-----
  izfrNTmQLnfsLzi2Wb9xPz2Qj9fQYGgeug3N2MkDuVHwpPcgkhHkJgCQuuvT+qZI
  MbS2U6wTS24SZk5RunJIUkitRKeWWMS28SLGfkDs1bBYlSPa5smAd3/q1OePi4ae
  <...>
  8S86b6zEmkser+SDYgGketS2DZ4hB+vh2ujSXmS8Gkwrn+BfHMzkbtio8lWbGw0l

 view all matches for this distribution


Git-Raw

 view release on metacpan or  search on metacpan

t/10-clone.t  view on Meta::CPAN


			my $ssh_dir = catfile($ENV{HOME}, '.ssh');
			ok -e $ssh_dir;

			my $public_key = catfile($ssh_dir, 'id_rsa.pub');
			my $private_key = catfile($ssh_dir, 'id_rsa');
			ok -f $public_key;
			ok -f $private_key;

			is $user, $ENV{USER};
			is $url, $remote_url;

			return Git::Raw::Cred -> sshkey(
				$user,
				$public_key,
				$private_key
			);
		},
		'certificate_check' => sub {
			my ($cert, $valid) = @_;
			$certificate_check_fired = 1;

 view all matches for this distribution


Git-Server

 view release on metacpan or  search on metacpan

git-deploy  view on Meta::CPAN


if (@$identities) {
    # Sanity check to verify identity files are ready to go, and expand relative paths if needed.
    my $verified_identities = [];
    my $public_key_file = {};
    my $private_key_file = {};
    foreach my $ident (@$identities) {
        if (my @found = agentkeys($ident)) {
            foreach (@found) {
                push @$verified_identities, $_ if !$public_key_file->{$_}++;
            }
        }
        elsif (-e $ident && -r _ && -s _) {
            my $pub = run_output_ignore_err "ssh-keygen", "-y", "-P", "", "-f", $ident;
            if ($pub) {
                warn localtime().": [$$] $Script: --identity '$ident': Using private key for: $pub";
                push @$verified_identities, $ident if !$private_key_file->{$ident}++;
            }
            elsif ($ident =~ m{^(.+)\.pub$} and -r $1 and $ident = $1) {
                redo; # Try again with the NON-".pub" file
            }
            else {

 view all matches for this distribution


GitHub-Apps-Auth

 view release on metacpan or  search on metacpan

lib/GitHub/Apps/Auth.pm  view on Meta::CPAN


our $VERSION = "0.04";

use Class::Accessor::Lite (
    rw => [qw/token expires installation_id/],
    ro => [qw/_furl private_key app_id/],
);

use Carp;
use Crypt::PK::RSA;
use Crypt::JWT qw/encode_jwt/;

lib/GitHub/Apps/Auth.pm  view on Meta::CPAN

            _lazy { "$self" . "$other" };
    };

sub new {
    my ($class, %args) = @_;
    if (!exists $args{private_key} || !$args{private_key}) {
        croak "private_key is required.";
    }
    if (!exists $args{app_id} || !$args{app_id}) {
        croak "app_id is required.";
    }
    if (!$args{installation_id} && !$args{login}) {
        croak "must be set installation_id or login.";
    }

    my $pk = Crypt::PK::RSA->new($args{private_key});

    my $klass = {
        private_key => $pk,
        installation_id => $args{installation_id},
        app_id => $args{app_id},
        expires => 0,
        _furl => Furl->new,
    };

lib/GitHub/Apps/Auth.pm  view on Meta::CPAN

            iat => time(),
            exp => time() + 60,
            iss => $self->app_id,
        },
        alg => "RS256",
        key => $self->private_key,
    );

    return $jwt;
}

lib/GitHub/Apps/Auth.pm  view on Meta::CPAN


=head1 SYNOPSIS

    use GitHub::Apps::Auth;
    my $auth = GitHub::Apps::Auth->new(
        private_key     => "<filename>", # when read private key from file
        private_key     => \$pk,         # when read private key from variable
        app_id          => <app_id>,
        login           => <organization or user>
    );
    # This method returns the cached token inside an object.
    # However, refresh expired token automatically.

lib/GitHub/Apps/Auth.pm  view on Meta::CPAN

=head1 CONSTRUCTOR

=head2 new

    my $auth = GitHub::Apps::Auth->new(
        private_key     => "<filename>",
        app_id          => <app_id>,
        installation_id => <installation_id>
    );

Constructs an instance of C<GitHub::Apps::Auth> from credentials.

=head3 parameters

=head4 private_key

B<Required: true>

This parameter is a private key of the GitHub Apps.

 view all matches for this distribution


Google-API-Client

 view release on metacpan or  search on metacpan

eg/service_accounts/reseller.pl  view on Meta::CPAN

    'https://www.googleapis.com/auth/apps.order'
);

my $auth_driver = Google::API::OAuth2::SignedJWT->new({
    service_account_name => '<< service account email here >>', 
    private_key => "$FindBin::<<private key path here >>",
    sub => '<< sub is optional, but can be here... >>',
    scopes => join(" ", @scopes)
});

my $response = $service->customers->get((

 view all matches for this distribution


( run in 1.601 second using v1.01-cache-2.11-cpan-39bf76dae61 )