feat: add get_public_key_pkcs1_string() for API naming symmetry#110
Merged
atoomic merged 1 commit intocpan-authors:mainfrom Mar 19, 2026
Merged
Conversation
Collaborator
|
@Koan-Bot rebase |
The import API has _new_public_key_pkcs1 / _new_public_key_x509, but the export side had get_public_key_string (PKCS#1) / get_public_key_x509_string without "pkcs1" in the PKCS#1 name. This adds get_public_key_pkcs1_string() as a Perl-level alias to fix the naming asymmetry. - Alias via glob assignment (*func = \&func) — zero overhead, no XS changes - POD documentation with cross-references to related methods - 4 new tests in format.t: output correctness, alias equivalence, round-trip Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b2ac096 to
f74474a
Compare
Contributor
Author
Rebase: feat: add get_public_key_pkcs1_string() for API naming symmetryBranch Diff: 2 files changed, 16 insertions(+), 1 deletion(-) Review feedback was analyzed and applied. Actions
CICI passed. Automated by Kōan |
atoomic
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
get_public_key_pkcs1_string()as a named alias forget_public_key_string(),returning the traditional RSAPublicKey PKCS#1 PEM format (
BEGIN RSA PUBLIC KEY).Why
The import API has
_new_public_key_pkcs1/_new_public_key_x509, but the exportside had
get_public_key_string(PKCS#1) /get_public_key_x509_string(X.509)— the PKCS#1 exporter lacked "pkcs1" in its name. This makes the API more
discoverable and symmetric.
How
Perl-level glob alias (
*get_public_key_pkcs1_string = \&get_public_key_string)— zero overhead, no XS changes needed since
get_public_key_string()alreadyproduces PKCS#1 output on all OpenSSL versions.
Testing
format.t: output correctness, alias equivalence, round-trip import🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 16 insertions(+), 1 deletion(-)
Code scan: clean
Tests: failed (23 Failed, 65280 Tests)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline