HEAT-Crypto
view release on metacpan or search on metacpan
lib/HEAT/Crypto.pm view on Meta::CPAN
=item keygen( $seed_key );
Generates a new key pair. It returns a hash with 3 values:
{
p => <public key bytes>,
k => <private key bytes>,
s => <signing key bytes>,
}
=item shared_key( $private_key, $public_key );
Computes shared secret.
Returns the key bytes.
=item sign( $private_key, $message );
Sign message with the private key.
Returns the signature bytes.
=item verify( $signature, $message, $public_key );
Verifies the message signature against the public key.
Returns 1 on success.
lib/HEAT/Crypto.pm view on Meta::CPAN
In array context it returns the encryption nonce, initialization vector and
cypher text. In scalar context it concatenates them.
=item decrypt( $data, $key );
Decrypts data with the given key. Data is expected to be in the format returned
by encrypt();
It returns the decrypted data on success or undefined in case of failure.
=item priv_to_pub_key( $private_key )
Derives the public key from the private key.
=item account_id( $public_key )
Derives the account ID from the public key.
=item keyspec( $key )
=item keyspec( $key, $is_private )
( run in 0.222 second using v1.01-cache-2.11-cpan-4d50c553e7e )