NAME

Crypt::Perl::Ed25519::PrivateKey

SYNOPSIS

my $new_key = Crypt::Perl::Ed25519::PrivateKey->new();

# The passed-in string should contain ONLY the private pieces.
my $import_key = Crypt::Perl::Ed25519::PrivateKey->new( $priv_str );

# … or do this if you’ve got the public component:
$import_key = Crypt::Perl::Ed25519::PrivateKey->new( $priv_str, $pub_str );

# Returns an octet string
my $signature = $key->sign( $message );

$key->verify( $message, $signature ) or die "Invalid sig for msg!";

#----------------------------------------------------------------------

# These return an octet string.
my $pub_str = $key->get_public();
my $priv_str = $key->get_private();

# Returns an object
my $pub_obj = $key->get_public_key();

DESCRIPTION

This class implements Ed25519 signing and verification.