Skip to content

collinjrose/command-line-crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

command-line-crypt

Command line crypt

When updating an old Mysql database server used for hosting email accessed by courier-authlib, I found that the previous methodology of updating the crypt password field by using the built in function encrypt() in MySQL no longer was available, resulting in the error 'FUNCTION database_name.encrypt does not exist'

Since authlib expects to use the linux system crypt() call, a quick an easy fix was this command line application to take a string and execute crypt() against it.

I used https://stackoverflow.com/questions/19231612/how-to-write-a-argv-and-argc as the starting point for this code.

Example Use in PHP:
$crypt_password = exec("/usr/bin/crypt $password");

About

Command line crypt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published