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"):
531531 implementations, it is as big as "uncompressed".
532532
533533 :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)
535538 """
536539 return der .topem (self .to_der (point_encoding ), "PUBLIC KEY" )
537540
@@ -937,7 +940,10 @@ def to_pem(self, point_encoding="uncompressed"):
937940 :param str point_encoding: format to use for encoding public point
938941
939942 :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)
941947 """
942948 # TODO: "BEGIN ECPARAMETERS"
943949 return der .topem (self .to_der (point_encoding ), "EC PRIVATE KEY" )
You can’t perform that action at this time.
0 commit comments