Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/starkbank_ecdsa-2.2.0-py3.11.egg/ellipticcurve/utils/pem.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

7 statements  

1from re import search 

2 

3 

4def getPemContent(pem, template): 

5 pattern = template.format(content="(.*)") 

6 return search("".join(pattern.splitlines()), "".join(pem.splitlines())).group(1) 

7 

8 

9def createPem(content, template): 

10 lines = [ 

11 content[start:start + 64] 

12 for start in range(0, len(content), 64) 

13 ] 

14 return template.format(content="\n".join(lines))