File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -531,7 +531,10 @@ def to_pem(self, point_encoding="uncompressed"):
531
531
implementations, it is as big as "uncompressed".
532
532
533
533
:return: portable encoding of the public key
534
- :rtype: str
534
+ :rtype: bytes
535
+
536
+ .. warning:: The PEM is encoded to US-ASCII, it needs to be
537
+ re-encoded if the system is incompatible (e.g. uses UTF-16)
535
538
"""
536
539
return der .topem (self .to_der (point_encoding ), "PUBLIC KEY" )
537
540
@@ -937,7 +940,10 @@ def to_pem(self, point_encoding="uncompressed"):
937
940
:param str point_encoding: format to use for encoding public point
938
941
939
942
:return: PEM encoded private key
940
- :rtype: str
943
+ :rtype: bytes
944
+
945
+ .. warning:: The PEM is encoded to US-ASCII, it needs to be
946
+ re-encoded if the system is incompatible (e.g. uses UTF-16)
941
947
"""
942
948
# TODO: "BEGIN ECPARAMETERS"
943
949
return der .topem (self .to_der (point_encoding ), "EC PRIVATE KEY" )
You can’t perform that action at this time.
0 commit comments