1Mail::DKIM::PrivateKey(U3s)er Contributed Perl DocumentatMiaoinl::DKIM::PrivateKey(3)
2
3
4

NAME

6       Mail::DKIM::PrivateKey - a private key loaded in memory for DKIM
7       signing
8

VERSION

10       version 1.20200907
11

SYNOPSIS

13        my $key1 = Mail::DKIM::PrivateKey->load(
14                      File => '/path/to/private.key');
15
16        my $key2 = Mail::DKIM::PrivateKey->load(
17                      Data => $base64);
18
19        # use the loaded key in a DKIM signing object
20        my $dkim = Mail::DKIM::Signer->new(
21                      Key => $key2,
22                    );
23

CONSTRUCTOR

25   load() - loads a private key into memory
26        my $key1 = Mail::DKIM::PrivateKey->load(
27                      File => '/path/to/private.key');
28
29       Loads the Base64-encoded key from the specified file.
30
31         my $key2 = Mail::DKIM::PrivateKey->load(Data => $base64);
32
33       Loads the Base64-encoded key from a string already in memory.
34
35         my $key3 = Mail::DKIM::PrivateKey->load(Cork => $openssl_object);
36
37       Creates a Mail::DKIM::PrivateKey wrapper object for the given OpenSSL
38       key object. The key object should be of type Crypt::OpenSSL::RSA.
39

METHODS

41   cork() - access the underlying OpenSSL key object
42         $openssl_object = $key->cork;
43
44       The returned object is of type Crypt::OpenSSL::RSA.
45
46   sign_digest()
47       Cryptographically sign the given message digest.
48
49         $key->sign_digest('SHA-1', sha1('my message text'));
50
51       The first parameter is the name of the digest: one of "SHA-1",
52       "SHA-256".
53
54       The second parameter is the message digest as a binary string.
55
56       The result should be the signed digest as a binary string.
57
58       1;
59

AUTHORS

61       •   Jason Long <jason@long.name>
62
63       •   Marc Bradshaw <marc@marcbradshaw.net>
64
65       •   Bron Gondwana <brong@fastmailteam.com> (ARC)
66

THANKS

68       Work on ensuring that this module passes the ARC test suite was
69       generously sponsored by Valimail (https://www.valimail.com/)
70
72       •   Copyright (C) 2013 by Messiah College
73
74       •   Copyright (C) 2010 by Jason Long
75
76       •   Copyright (C) 2017 by Standcore LLC
77
78       •   Copyright (C) 2020 by FastMail Pty Ltd
79
80       This library is free software; you can redistribute it and/or modify it
81       under the same terms as Perl itself, either Perl version 5.8.6 or, at
82       your option, any later version of Perl 5 you may have available.
83
84
85
86perl v5.32.1                      2021-01-27         Mail::DKIM::PrivateKey(3)
Impressum