| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | protected static function signViaCryptGPG(string $message, string $privateKey) |
||
| 17 | { |
||
| 18 | Yii::beginProfile('Generate PGP signature', __METHOD__); |
||
| 19 | $gpg = new Crypt_GPG(static::cryptGpgDefaultOptions()); |
||
| 20 | $keyInfo = $gpg->importKey($privateKey); |
||
| 21 | $gpg->addSignKey($keyInfo['fingerprint']); |
||
| 22 | $output = $gpg->sign($message, Crypt_GPG::SIGN_MODE_CLEAR); |
||
| 23 | Yii::endProfile('Generate PGP signature', __METHOD__); |
||
| 24 | return $output; |
||
| 25 | } |
||
| 33 |