Encryption of card number


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Encryption of card number
# 8  
Old 08-06-2009
No panyam that's not working it does not encrypt at all then
Please suggest at your convenient time
# 9  
Old 08-06-2009
Quote:
Originally Posted by mad_man12
the above code is not working and not encrypting.
You keep using that word. I do not think it means what you think it means.

It is not encrypting the data, it is destroying the data. Perhaps you mean obscuring? I hope so, since there's no way to get it back once that's done except by having an unobscured copy somewhere else.
# 10  
Old 08-07-2009
The code , that i posted working fine for me.

Let me know where you have the issue.
# 11  
Old 08-10-2009
Thanks

Thanks Panyam that works fineSmilie
# 12  
Old 08-12-2009
replace only if the item is numeric

Hi Panyam,
I need to replace or encrypt card only if the item here ($i+12) is numeric
how do i check that
# 13  
Old 08-12-2009
A further enhancement to the script :

Code:
awk -F":" '
BEGIN {OFS=":"}
$0 ~/\+DEF/ {
for(i=1;i<=NF;i++)
{
if($i=="+DEF")
{
        if( $(i+12) ~ /[^0-9]/ )
        {
        next;
        }
        else
        {
        if(length($(i+12))>=15)
                {
                $(i+12)=substr($(12+i),1,4)"******"substr($(12+i),11,16)
                }
        }
}
}
}1' file_name.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Cybersecurity

File encryption tools with MAC address as an encryption key

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

2. Programming

RSA encryption

Hi everybody, I know this is a linux forum but I've got a question about encryption. If you want to encrypt (and decrypt) more than one byte at a time do you have to choose sufficiently large numbers when generating the keys for the math to work out? Every example I've come across on the internet... (5 Replies)
Discussion started by: vindy
5 Replies

3. UNIX Desktop Questions & Answers

Does Red Hat Fedora support Nvidia card 8800GTX and 260 card?

Does Red Hat Fedora support Nvidia card 8800GTX and 260 card? Does any Linux OS support Nvidia card? (1 Reply)
Discussion started by: sito
1 Replies

4. HP-UX

how can I determine which NIC card is virtual NIC Card

how can I determine which NIC card is virtual NIC Card which condition can make a decision Does HP UX have Virtual Network Adapter Concept if ,it has where I can Find if I Install Virutal Network Adapter or which command that i can get it or which software can generate thanks (2 Replies)
Discussion started by: alert0919
2 Replies

5. UNIX for Dummies Questions & Answers

Encryption on SCO

Can someone help me please. I have a database that we backup using cpio. Is there an encryption option that I could use when taking this backup. Thanks in advance for any help. (0 Replies)
Discussion started by: mandarin
0 Replies

6. IP Networking

no encryption type specified

Hi I have created a user in snmpv3 as myuser n gave a password. Its also feching data by snmpget. Then I created another user as arika and the password is same as myuser.. Now I am trying to change the password by the command : snmpusm -v 3 -u arika -l authNoPriv -a MD5 -A my_password... (1 Reply)
Discussion started by: swapna_me
1 Replies

7. UNIX for Advanced & Expert Users

pgp encryption

Hi I have one script for doing the gpg encryption on linux. The encrytion is doing fine when i am running the script from command prompt on linux The same script when it is triggering from mainframe using sysopts option in NDM(connect direct) the encryption step in the shell script is... (0 Replies)
Discussion started by: Arvind Maurya
0 Replies

8. UNIX for Dummies Questions & Answers

File encryption/Key encryption ????

My dilemma, I need to send, deemed confidential, information via e-mail (SMTP). This information is sitting as a file on AIX. Typically I can send this data as a e-mail attachment via what we term a "mail filter" using telnet. I now would like to somehow encrypt the data and send it to a e-mail... (1 Reply)
Discussion started by: hugow
1 Replies

9. Shell Programming and Scripting

encryption is possible??

NEED expertise help for this topic!!! Question 1: Is encryption possible for the shell scriping programing? shadow the scriping file, do think is impossible... Question2: built a simple program with the simplicity function that allow user change settings by enter corret name and... (3 Replies)
Discussion started by: trynew
3 Replies
Login or Register to Ask a Question