Hi Alex,
is it possible in picolisp to create pipes from external programs,
e.g. like in bash? I.e. create a pipe, write to it on one end and
read from it on the other end? E.g. `base64 | wc -l`?
Also, is it possible in the following code to suppress the two prompts
Encryption key:
Again:
shown by bcrypt? Maybe read the two lines in or redirect bcrypt
stdout to /dev/null?
: (de bcrypt (Data Salt)
(default Salt (fmt64 (in '/dev/random (rd 42)))) # 56*3/4=42
(unless (<= 8 (length (pipe (prin Salt) (line T))) 56)
(quit "Length of Salt must be from 8 to 56" Salt))
(let (F (pipe (call 'mktemp)
(line T))
G (pack F ".bfe"))
(out F (print Data))
(out (list 'bcrypt F)
(prinl Salt)
(prinl Salt))
(prog1
(cons Salt (pipe (call 'base64 '-w 0 G) (line T)))
(call 'rm '-f G))))
-> bcrypt
: (bcrypt "hello")
Encryption key:
Again:
-> ("e07OZN8X;IWgm8bXjNgKrWG9Ib4c11hqEcRhol8DNHd1Mru2VqfhNRS" .
"VAE/tAC/bQUOifdyG6SPS89pgd8ceWsaUHPDvCFKXSyHs358BUMR32qkfQEtwB/AIWEU9tTIXsW6+sC+VxbAg5b6x/HhRP8ie04HAAAA")
:
Thank you,
Tomas
--
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]