pem.bend checks
raw source on the hub · import element-x509@0.1.0.0/pem.bend as Pem
2 imports
import Base import element-text@0.1.0.0/base64.bend as B64
Definitions
def starts source · line 8 · raw
@p:String -> @s:String -> Bool
def rev_str source · line 19 · raw
@cs:List<&2, Char> -> String
def cut_out source · line 24 · raw
@cut:Bool -> @+cur:List<&2, Char> -> @+out:List<&2, String> -> List<&2, String>
The pieces so far, with the current one closed at a cut (a pick reversed it at every char: quadratic in the pieces' length).
def lines_go source · line 31 · raw
@s:String -> @+cur:List<&2, Char> -> @+out:List<&2, String> -> List<&2, String>
def join source · line 39 · raw
@ls:List<&2, String> -> String
def emit source · line 47 · raw
@end:Bool -> @+cur:List<&2, String> -> @+out:List<&2, List<&2, U32>> -> List<&2, List<&2, U32>>
Decoding only at a block's end (a Bool.pick would decode at every line).
def blocks source · line 55 · raw
@ls:List<&2, String> -> @+inside:Bool -> @+cur:List<&2, String> -> @+out:List<&2, List<&2, U32>> -> List<&2, List<&2, U32>>
inside a block, cur holds its lines, newest first.
def certificates source · line 66 · raw
@+text:String -> List<&2, List<&2, U32>>