-1
Encrypting Challenge
Your encrypting program must be able to do following things:
- Input password
- Generate random key
- Encrypt random key with set key
Then, the decrypting program must be able to these things: - Input encrypted password
- Input encrypted random key
- Decrypt random key
- Decrypt password with decrypted random key
- Print password
The encryption must be setted with the key. It must be a table encryption or a encryption which makes the unencrypted values to a part of the key. This is code-golf. The shortest program wins!
3I voted to close as unclear what you're asking, because I'm not even sure what the inputs are for all of the mentioned use cases. However, you also need to narrow down the spec to avoid the question being closed as too broad. What counts as "encrypted". – Peter Taylor – 2016-05-02T12:28:50.273
1
encrypt=(p,k)=>p+k; decrypt=(p,k)=>p.substring(0,p.indexOf(k));
Best encryption method ever! Very secure! Jokes aside, you should probably specify what kind of encryption method should be used, or restrict to a set of methods. As it is, this challenge is too broad to produce fair results – Bassdrop Cumberwubwubwub – 2016-05-02T12:35:15.280I see you've tried to clarify the challenge a bit with your recent edit, but I'm still not sure what counts as "encryption" here. There's a lot of ways to encrypt something, some good, many bad (e.g. Bas' example), so unfortunately the question is still quite broad as is... – Sp3000 – 2016-05-03T13:06:22.727
It doesn't matter which kind of encryption you choose, it may be Casear, BASE64... Just take any encryption. – Mega Man – 2016-05-03T13:46:57.087
...so, double ROT-13 is fair game? – Sanchises – 2016-05-03T16:40:40.127
Function(s) or complete program? If a complete program, what should be the command-line? If any cypher is allowed, I choose the null cypher: the plaintext is passed as-is to the cyphertext, ignoring the password. Please set the encryption method. – jose_castro_arnaud – 2016-05-04T01:09:21.303
@MegaMan Base64 is not an encryption method. – Poke – 2016-06-24T18:31:08.603
Didn't know it, but when I think about it... – Mega Man – 2016-06-25T05:13:06.363