GPG_Public_Key::GetFingerprint PHP Méthode

GetFingerprint() public méthode

public GetFingerprint ( )
    function GetFingerprint()
    {
        return strtoupper(trim(chunk_split($this->fp, 4, ' ')));
    }

Usage Example

 function test_VerifyGnuPGDSAKey()
 {
     // OpenPGP Test Key
     $public_key_ascii = $this->getGnuPGDSAKey();
     $gpg = new GPG();
     $pub_key = new GPG_Public_Key($public_key_ascii);
     $this->assertEquals(PK_TYPE_ELGAMAL, $pub_key->GetKeyType(), 'OpenPGP Incorrect Key Type');
     $this->assertEquals('76D78F0500D026C4', $pub_key->GetKeyId(), 'OpenPGP Incorrect Key ID');
     $this->assertEquals('85E3 8F69 046B 44C1 EC9F B07B 76D7 8F05 00D0 26C4', $pub_key->GetFingerprint(), 'OpenPGP Incorrect Fingerprint');
 }