#include "tomcrypt.h"
-MODULE = File::KDBX::XS PACKAGE = File::KDBX::Util
+MODULE = File::KDBX::XS PACKAGE = File::KDBX::XS
PROTOTYPES: DISABLE
OUTPUT:
RETVAL
-MODULE = File::KDBX::XS PACKAGE = File::KDBX::KDF::AES
-
-PROTOTYPES: DISABLE
-
SV*
-_transform_half_xs(const char* key, const char* seed, unsigned int rounds)
+kdf_aes_transform_half(const char* key, const char* seed, unsigned int rounds)
CODE:
symmetric_key skey;
use warnings;
use strict;
+use Exporter qw(import);
use XSLoader;
our $VERSION = '999.999'; # VERSION
+our @EXPORT_OK = qw(
+ CowREFCNT
+ kdf_aes_transform_half
+);
+
XSLoader::load(__PACKAGE__, $VERSION);
1;
=end HTML
+=func CowREFCNT
+
+Get the copy-on-write (COW) reference count of a scalar, or C<undef> if the perl does not support scalar COW
+or if the scalar is not COW.
+
+See also L<B::COW/"cowrefcnt( PV )">.
+
=cut
my $rounds = 123;
my $expected = pack('H*', '7deb990760f2ff0f9b8248d63bfb7264');
-my $result = File::KDBX::KDF::AES::_transform_half_xs($key, $seed, $rounds);
+my $result = File::KDBX::XS::kdf_aes_transform_half($key, $seed, $rounds);
is $result, $expected, 'AES KDF transform works' or diag unpack('H*', $result);
done_testing;