06-18-2012
actually this is one liner was in some old script which i saw recently.. can you tell me how to encrypt again the decrypted content.. with same pattern
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to encrypt a file in UNIX(HP-UX) and Transfer to a FTP server. Our FTP server is Windows NT. SO, how can i decrypt the file which is encrypted in UNIX, in Windows NT.
Please, help me this is urgent.
Siva Gorantla:confused: (3 Replies)
Discussion started by: gorantla
3 Replies
2. UNIX for Advanced & Expert Users
Hi,
I do not want the plaintext password to appear in the netrc file. So I want to encrypt the password. Is there a way to encrypt the password and still make ftp to use the netrc ?
Thanks in advance.
-Gow:confused: (2 Replies)
Discussion started by: ggowrish
2 Replies
3. UNIX for Dummies Questions & Answers
Hello sir,
we are able to do :
But when I goto /bin or /usr/bin to see the code of "ls". I found it to be encrypted. So can u please tell me how to encrypt a code in such a way that the user can run it but cannot see the source code.
example:
if I have a shell script named "sample.sh" as... (5 Replies)
Discussion started by: nsharath
5 Replies
4. Shell Programming and Scripting
I have a requirement, which is as follows
*. Folder contains list of xmls. Script has to create new xml files by copying the existing one and renaming it by appending "_pre.xml" at the end.
*. Each file has multiple <Name>fileName</Name> entry. The script has to find the first occurance of... (1 Reply)
Discussion started by: sudesh.ach
1 Replies
5. Shell Programming and Scripting
Hi All,
I have connected to MainFrame system from Unix AIX Server then using ftp i get the file "NJUSP_XYXYXY_NONONO" to Unix. Now when i tried opening this file using cat/more i am getting the content fully in encrypted format. please help me to read the content of this file from my Unix... (5 Replies)
Discussion started by: Arunprasad
5 Replies
6. UNIX for Dummies Questions & Answers
i have an application that uses the encrypted password that's in the /etc/shadow file.
i copied the line for the particular username i was interested it in from shadow file and i pasted it into the password file of the application. the application is nagios.
this application allowed that... (5 Replies)
Discussion started by: SkySmart
5 Replies
7. UNIX for Dummies Questions & Answers
Well I did something stupid. I opened a file using vi, and accidentally saved it using <esc>:Xx.
So I know the key is x, but what I can't figure out is how to save the file without encryption. (4 Replies)
Discussion started by: jgt
4 Replies
8. UNIX for Advanced & Expert Users
Hello All,
Is there a way to determine how many public keys are embedded or used to encrypt in a GPG file with out decrypting the actual encrypted file. I know i can see the keys & email id's used when we decrypt it, but curious to find a command if any to know with out decrypting the actual file... (2 Replies)
Discussion started by: Ariean
2 Replies
9. Shell Programming and Scripting
Hi,
can it be possible to pass and argument to an encrypted script?
for example.. Say I have this script which takes one input..
> cat aa
#!/bin/ksh
UNAME=$1
echo "Hi $UNAME.."
> aa TEST
Hi TEST..
Now I encrypted this code.. (6 Replies)
Discussion started by: akore83
6 Replies
10. Shell Programming and Scripting
Hi,
I am trying to find out the original file size of an encrypted file in SunOS.
The file was decrypted with gpg command.
I want to know the size of the orginal file without decrypting it. I am using the below command, but it is not working for big files(more than 1 GB).
gpg --passphrase... (4 Replies)
Discussion started by: vsachan
4 Replies
LEARN ABOUT NETBSD
bio_f_cipher
BIO_f_cipher(3) OpenSSL BIO_f_cipher(3)
NAME
BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher BIO filter
LIBRARY
libcrypto, -lcrypto
SYNOPSIS
#include <openssl/bio.h>
#include <openssl/evp.h>
BIO_METHOD * BIO_f_cipher(void);
void BIO_set_cipher(BIO *b,const EVP_CIPHER *cipher,
unsigned char *key, unsigned char *iv, int enc);
int BIO_get_cipher_status(BIO *b)
int BIO_get_cipher_ctx(BIO *b, EVP_CIPHER_CTX **pctx)
DESCRIPTION
BIO_f_cipher() returns the cipher BIO method. This is a filter BIO that encrypts any data written through it, and decrypts any data read
from it. It is a BIO wrapper for the cipher routines EVP_CipherInit(), EVP_CipherUpdate() and EVP_CipherFinal().
Cipher BIOs do not support BIO_gets() or BIO_puts().
BIO_flush() on an encryption BIO that is being written through is used to signal that no more data is to be encrypted: this is used to
flush and possibly pad the final block through the BIO.
BIO_set_cipher() sets the cipher of BIO b to cipher using key key and IV iv. enc should be set to 1 for encryption and zero for decryption.
When reading from an encryption BIO the final block is automatically decrypted and checked when EOF is detected. BIO_get_cipher_status() is
a BIO_ctrl() macro which can be called to determine whether the decryption operation was successful.
BIO_get_cipher_ctx() is a BIO_ctrl() macro which retrieves the internal BIO cipher context. The retrieved context can be used in
conjunction with the standard cipher routines to set it up. This is useful when BIO_set_cipher() is not flexible enough for the
applications needs.
NOTES
When encrypting BIO_flush() must be called to flush the final block through the BIO. If it is not then the final block will fail a
subsequent decrypt.
When decrypting an error on the final block is signalled by a zero return value from the read operation. A successful decrypt followed by
EOF will also return zero for the final read. BIO_get_cipher_status() should be called to determine if the decrypt was successful.
As always, if BIO_gets() or BIO_puts() support is needed then it can be achieved by preceding the cipher BIO with a buffering BIO.
RETURN VALUES
BIO_f_cipher() returns the cipher BIO method.
BIO_set_cipher() does not return a value.
BIO_get_cipher_status() returns 1 for a successful decrypt and 0 for failure.
BIO_get_cipher_ctx() currently always returns 1.
EXAMPLES
TBA
SEE ALSO
TBA
1.0.1i 2009-07-20 BIO_f_cipher(3)