08-19-2012
String encryption and decryption
Hello All,
There are so many questions on this and I didn't find any concluded answer.
I want to encrypt a string in the script, actually this is a password. I tried using openssl (I am a newbie to openssl), but it is generating a long one which we can't remember.
I want to encrypt the password and want to share it, so users can use that and my script needs to decrypt when the users enter it.
Any solutions, where I can generate small passwords (or equal length of original).
Thanks!
AIX 5.3
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello guys !
I have used "crypt <first> second" command to encrypt "first" to "second" file. i have assign a key for that of course.
Now when i try to look content of "seocnd" file through "cat second" command, the file is encrypted and cannot be read which is according to plan.
But when... (3 Replies)
Discussion started by: abidmalik
3 Replies
2. Programming
Dear all,
If anyone has some ideas for me how to tackle the following situation:
Imagine a type of client-server application. The client application is started by a human operator with all the necessary LDAP/Kerberos in place. The server application is started automatically as a daemon process.... (2 Replies)
Discussion started by: domivv
2 Replies
3. Solaris
Hi
Someone is going to send me a file that they have encrypted by PGP encryption on windows pc to my solaris 9 server.
They will give me the pgp key to decrypt the file.
How can I do this on solaris 9
Is there a tool installed by default to decrypt or do I need to install something to... (0 Replies)
Discussion started by: frustrated1
0 Replies
4. Solaris
hi,
is there any library functions available in sun solaries for encryption and decryption functions.
regards
suresh (1 Reply)
Discussion started by: suresh_rtp
1 Replies
5. UNIX for Dummies Questions & Answers
Dear Members,
Can we find if a particular file is encrypted or decrypted.
I need a command by which i should be able to identify if a file is encrypted or decrypted.
How can we do this? (1 Reply)
Discussion started by: sandeep_1105
1 Replies
6. Ubuntu
we are to develope a project on linux whose aim is to automatically encrypt files after logoff and to decrypt them using password after log in
this is to be made by chging source code of linux ...........
can any one help me on this???? (1 Reply)
Discussion started by: vyom
1 Replies
7. Shell Programming and Scripting
we r to develope a project which involves automatic encryption of all the text files user was working upon during logg off
and to decrypt them during log on
this is to be done by writing a shell script
can anyone help (2 Replies)
Discussion started by: vyom
2 Replies
8. Cybersecurity
Hi all,
I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS.
For example: when A wants to send file to B
A will encrypt the file with B's computer MAC/IP address as an encryption key
This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies
9. Shell Programming and Scripting
Hi Friends,
There are some 7 years script in out linux server. I am trying to understand them since Linux Server changed(A).
Below line in one of the encrypting script. Here scenario is encrypting bank files in our (A) server and doing Secure Copy to Server (B).
GPG -v --batch --yes --armor... (1 Reply)
Discussion started by: johnsnow
1 Replies
LEARN ABOUT OSX
ssl_ctx_set_default_passwd_cb
SSL_CTX_set_default_passwd_cb(3) OpenSSL SSL_CTX_set_default_passwd_cb(3)
NAME
SSL_CTX_set_default_passwd_cb, SSL_CTX_set_default_passwd_cb_userdata - set passwd callback for encrypted PEM file handling
SYNOPSIS
#include <openssl/ssl.h>
void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
int pem_passwd_cb(char *buf, int size, int rwflag, void *userdata);
DESCRIPTION
SSL_CTX_set_default_passwd_cb() sets the default password callback called when loading/storing a PEM certificate with encryption.
SSL_CTX_set_default_passwd_cb_userdata() sets a pointer to userdata which will be provided to the password callback on invocation.
The pem_passwd_cb(), which must be provided by the application, hands back the password to be used during decryption. On invocation a
pointer to userdata is provided. The pem_passwd_cb must write the password into the provided buffer buf which is of size size. The actual
length of the password must be returned to the calling function. rwflag indicates whether the callback is used for reading/decryption
(rwflag=0) or writing/encryption (rwflag=1).
NOTES
When loading or storing private keys, a password might be supplied to protect the private key. The way this password can be supplied may
depend on the application. If only one private key is handled, it can be practical to have pem_passwd_cb() handle the password dialog
interactively. If several keys have to be handled, it can be practical to ask for the password once, then keep it in memory and use it
several times. In the last case, the password could be stored into the userdata storage and the pem_passwd_cb() only returns the password
already stored.
When asking for the password interactively, pem_passwd_cb() can use rwflag to check, whether an item shall be encrypted (rwflag=1). In
this case the password dialog may ask for the same password twice for comparison in order to catch typos, that would make decryption
impossible.
Other items in PEM formatting (certificates) can also be encrypted, it is however not usual, as certificate information is considered
public.
RETURN VALUES
SSL_CTX_set_default_passwd_cb() and SSL_CTX_set_default_passwd_cb_userdata() do not provide diagnostic information.
EXAMPLES
The following example returns the password provided as userdata to the calling function. The password is considered to be a '