Terminal::Readsecret - A perl6 binding of readsecret ( https://github.com/dmeranda/readsecret ) for reading secrets or passwords from a command line secretly (not being displayed)
use Terminal::Readsecret; my $password = getsecret("password:" ); say "your password is: " ~ $password;
use Terminal::Readsecret; my Timespec $timeout .= new(tv-sec => 5, tv-nsec => 0); # set timeout to 5 sec my $password = getsecret("password:", $timeout); say "your password is: " ~ $password;
Terminal::Readsecret is a perl6 binding of readsecret ( https://github.com/dmeranda/readsecret ). Readsecret is a simple self-contained C (or C++) library intended to be used on Unix and Unix-like operating systems that need to read a password or other textual secret typed in by the user while in a text-mode environment, such as from a console or shell.
proto getsecret(Str:D, |) returns Str multi sub getsecret(Str:D) returns Str multi sub getsecret(Str:D, Timespec) returns Str
Reads secrets or passwords from a command line and returns its input.
timespec class has been removed since version
Timespec class instead of
COPYRIGHT AND LICENSE
Copyright 2016 titsuki
Readsecret by Deron Meranda is licensed under Public Domain ( http://creativecommons.org/publicdomain/zero/1.0/ ).
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
- readsecret https://github.com/dmeranda/readsecret