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


Crypt-RSA-Parse

 view release on metacpan or  search on metacpan

lib/Crypt/RSA/Parse.pm  view on Meta::CPAN


=head1 SYNOPSIS

    #General-purpose, native RSA or PKCS8 (DER or PEM)
    my $public_rsa = Crypt::RSA::Parse::public($key_str);
    my $private_rsa = Crypt::RSA::Parse::private($private_key_str);

    $public_rsa->exponent();    #alias E()
    $public_rsa->modulus();     #isa Math::BigInt, alias N()
    $public_rsa->size();        #i.e., the modulus length in bits

 view all matches for this distribution


Crypt-RSA-Yandex

 view release on metacpan or  search on metacpan

CP_RSA.cpp  view on Meta::CPAN

	}
#endif
	return modexp( plain, e, m );
}

vlong private_key::decrypt( const vlong& cipher )
{
	// Calculate values for performing decryption
	// These could be cached, but the calculation is quite fast
	vlong d = modinv( e, (p-(vlong)1)*(q-(vlong)1) );
	vlong u = modinv( p, q );

CP_RSA.cpp  view on Meta::CPAN


}



void private_key::MakeMeStr(char * me_str)
{
	vlong_pair_2_str (me_str,m,e);
}

void private_key::MakePqStr(char * me_str)
{
	vlong_pair_2_str (me_str,p,q);
}

void private_key::MakePq (const char *me_str)
{
	str_2_vlong_pair (me_str,p,q);
	{
	m = p*q;
	e = 50001; // must be odd since p-1 and q-1 are even

 view all matches for this distribution


Crypt-SMimeEngine

 view release on metacpan or  search on metacpan

SMimeEngine.xs  view on Meta::CPAN

            destroy_ui_method();
            sprintf(errstring, "Error to load engine: %s (%s)", engine_name, libeng_file);
            return 1;
        }

        if( !(pkey = ENGINE_load_private_key(eng, key_file, ui_method, NULL)) ){
            destroy_ui_method();
            ENGINE_cleanup();
            sprintf(errstring, "Error to load private key file: %s", key_file);
            return 1;
        }

SMimeEngine.xs  view on Meta::CPAN

    }

    // load key
    if( eng ){
        // ENGINE HW
        if( !(pkey = ENGINE_load_private_key(eng, prk, ui_method, NULL)) ){
            destroy_ui_method();
            ENGINE_cleanup();
            sprintf(errstring, "Error to load private key file: %s", prk);
            return 1;
        }

 view all matches for this distribution


Crypt-SSLeay

 view release on metacpan or  search on metacpan

lib/Net/SSL.pm  view on Meta::CPAN

        }
    }

    # if both configs are set, then verify them
    if ($count == 2) {
        if (! $ctx->check_private_key) {
            croak("Private key and certificate do not match");
        }
    }

    $count; # number of successful cert loads/checks

 view all matches for this distribution


CryptX

 view release on metacpan or  search on metacpan

lib/Crypt/PK/RSA.pm  view on Meta::CPAN

=head1 SYNOPSIS

 ### OO interface

 my $message = 'hello world';
 my $private_key = Crypt::PK::RSA->new();
 $private_key->generate_key(256, 65537);

 my $public_der = $private_key->export_key_der('public');
 my $public_key = Crypt::PK::RSA->new(\$public_der);

 my $ciphertext = $public_key->encrypt($message);
 my $plaintext = $private_key->decrypt($ciphertext);

 my $signature = $private_key->sign_message($message, 'SHA256');
 $public_key->verify_message($signature, $message, 'SHA256') or die "ERROR";

 my $private_der = $private_key->export_key_der('private');
 my $private_pem = $private_key->export_key_pem('private');
 my $public_pem = $public_key->export_key_pem('public');

=head1 DESCRIPTION

The module provides a full featured RSA implementation.

 view all matches for this distribution


Crypto-Utils

 view release on metacpan or  search on metacpan

ffi/openssl-func.c  view on Meta::CPAN


  EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_PRIV_KEY, &priv_bn);

  if (priv_bn == NULL) {

    EVP_PKEY_get_raw_private_key(pkey, NULL, &priv_len);
    priv = OPENSSL_malloc(priv_len);
    EVP_PKEY_get_raw_private_key(pkey, priv, &priv_len);

    priv_bn = BN_bin2bn(priv, priv_len, NULL);
    OPENSSL_free(priv);
  }

ffi/openssl-func.c  view on Meta::CPAN

  nid = OBJ_sn2nid(group_name);

  priv = OPENSSL_hexstr2buf(priv_hex, &priv_len);

  if (priv) {
    pkey = EVP_PKEY_new_raw_private_key(nid, NULL, priv, priv_len);
  } else {
    ctx = EVP_PKEY_CTX_new_id(nid, NULL);
    if (ctx) {
      EVP_PKEY_keygen_init(ctx);
      EVP_PKEY_keygen(ctx, &pkey);

 view all matches for this distribution


CryptoTron

 view release on metacpan or  search on metacpan

lib/CryptoTron/CreateAccount.pm  view on Meta::CPAN

    # Generate seed with automatic language detection and empty passphrase.
    seed_bytes = Bip39SeedGenerator(mnemonic).Generate()
    # Create Bip44 Tron object.
    bip44_tron = Bip44.FromSeed(seed_bytes, Bip44Coins.TRON)
    # Create a private key in hex and upper case.
    private_key = bip44_tron.PrivateKey().Raw().ToHex().upper()
    # Create a public key in upper case.
    public_key = str(bip44_tron.PublicKey().RawUncompressed()).upper()
    # Create Base58 address.
    base58_addr = bip44_tron.PublicKey().ToAddress()
    # Create a Hex address in hex and upper case.
    hex_addr = base58.b58decode_check(base58_addr).hex().upper()
    # Print result to screen.
    print(fmt_str.format("Private Key:", private_key))
    print(fmt_str.format("Address (Base58):", base58_addr))
    print(fmt_str.format("Address (Hex): ", hex_addr))
    print(fmt_str.format("Public Key: ", public_key))

def mnemonic():

 view all matches for this distribution


DJabberd

 view release on metacpan or  search on metacpan

lib/DJabberd.pm  view on Meta::CPAN

}

# mimicing Apache's SSLCertificateKeyFile config
sub set_config_sslcertificatekeyfile {
    my ($self, $val) = @_;
    $self->{ssl_private_key_file} = as_abs_path($val);
}

# mimicing Apache's SSLCertificateFile
sub set_config_sslcertificatefile {
    my ($self, $val) = @_;

lib/DJabberd.pm  view on Meta::CPAN

sub set_config_sslcertificatechainfile {
    my ($self, $val) = @_;
    $self->{ssl_cert_chain_file} = as_abs_path($val);
}

sub ssl_private_key_file { return $_[0]{ssl_private_key_file} }
sub ssl_cert_file        { return $_[0]{ssl_cert_file}        }
sub ssl_cert_chain_file  { return $_[0]{ssl_cert_chain_file}  }

sub set_config_oldssl {
    my ($self, $val) = @_;

 view all matches for this distribution


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-ClickHouse

 view release on metacpan or  search on metacpan

xs/io.c  view on Meta::CPAN

                fail_connection(self, "SSL_CTX_load_verify_locations failed");
                return;
            }
        }
        /* Mutual TLS: load client certificate + private key when both
         * are configured. SSL_CTX_check_private_key verifies that the
         * private key matches the loaded certificate's public half. */
        if (self->tls_cert_file && self->tls_key_file) {
            if (SSL_CTX_use_certificate_chain_file(self->ssl_ctx, self->tls_cert_file) != 1) {
                capture_tls_error(self);
                fail_connection(self, "SSL_CTX_use_certificate_chain_file failed");

xs/io.c  view on Meta::CPAN

            if (SSL_CTX_use_PrivateKey_file(self->ssl_ctx, self->tls_key_file, SSL_FILETYPE_PEM) != 1) {
                capture_tls_error(self);
                fail_connection(self, "SSL_CTX_use_PrivateKey_file failed");
                return;
            }
            if (SSL_CTX_check_private_key(self->ssl_ctx) != 1) {
                capture_tls_error(self);
                fail_connection(self, "TLS client cert / private key mismatch");
                return;
            }
        } else if (self->tls_cert_file || self->tls_key_file) {

 view all matches for this distribution


EV-Etcd

 view release on metacpan or  search on metacpan

Etcd.xs  view on Meta::CPAN

        client->keepalive_timeout_ms = 10000;

    if (tls) {
        grpc_ssl_pem_key_cert_pair pair;
        if (cert_pem) {
            pair.private_key = SvPV_nolen(key_pem);
            pair.cert_chain = SvPV_nolen(cert_pem);
        }
        client->creds = grpc_ssl_credentials_create(
            ca_pem ? SvPV_nolen(ca_pem) : NULL, cert_pem ? &pair : NULL, NULL, NULL);
        if (!client->creds) {

 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

    size_t raw_len = 0;
    if (nats_base32_decode(seed_encoded, strlen(seed_encoded), raw, 64, &raw_len) != 0
        || raw_len != 36
        || nats_crc16(raw, 34) != ((uint16_t)raw[34] | ((uint16_t)raw[35] << 8)))
        return NULL;
    return EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL, raw + 2, 32);
}

static int nats_nkey_sign(const char *seed_encoded, const char *nonce, size_t nonce_len,
                          char *sig_out, size_t sig_out_size)
{

 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_cert && ssl_key && *ssl_key) {
        info.ssl_cert_filepath = ssl_cert;
        info.ssl_private_key_filepath = ssl_key;
        if (ssl_ca && *ssl_ca)
            info.ssl_ca_filepath = ssl_ca;
        info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
        ensure_ssl_keepalive(); /* pin global init so vhost/context teardown won't OPENSSL_cleanup */
    }

 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


Feersum

 view release on metacpan or  search on metacpan

eg/envoy-stream.yaml  view on Meta::CPAN

                tls_params:
                  tls_minimum_protocol_version: TLSv1_2
                tls_certificates:
                  - certificate_chain:
                      filename: /etc/ssl/certs/server.crt
                    private_key:
                      filename: /etc/ssl/private/server.key
                alpn_protocols: ["h2", "http/1.1"]
          filters:
            - name: envoy.filters.network.tcp_proxy
              typed_config:

 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


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