public function getFingerprint($alg = 'sha256')
    {
        if (!in_array($alg, hash_algos())) {
            throw new RuntimeException(
                sprintf(
                    'unsupported algorithm "%s"',
                    $alg
                )
            );
        }

        return hash($alg, $this->toDer(), true);
    }