[Solved] What type of encoding is it?

/* package whatever; // don’t place package name! */ import java.util.*; import java.lang.*; import java.io.*; import javax.xml.bind.DatatypeConverter; /* Name of the class has to be “Main” only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { byte[] bytes = DatatypeConverter.parseBase64Binary(“CEwcBxcZHAAYSFJOWl4UGQoTAF1VU0wMHRgWHBIMGhdTWkNTTAoBAB8cHg4LVVhaXhYNCR0GDgpU S1VSUxMXEBkKFh0YFRZMQ1JTGxobAgoEERccHR9IUk5aXgYFAx0XERwXTENSUwgYEQkGBgddWUlL SAEVHBxUR09VEhUWVEtVUlMNEB1KSA8=”); String pass = “Username”; … Read more

[Solved] I want to encrypt blob using SHA in javascript

This is not possible. SHA is a cryptographic hash function, not an encryption function – the result is not reversible. See Fundamental difference between Hashing and Encryption algorithms for an in-depth explanation. Now, to really encrypt data in JavaScript (say with AES), there are several options. Since it is hard to get cryptography and key … Read more

[Solved] Ceaser Cipher crack using C language

Recall that a Caesar Cipher has only 25 possible shifts. Also, for text of non-trivial length, it’s highly likely that only one shift will make the input make sense. One possible approach, then, is to see if the result of the shift makes sense; if it does, then it’s probably the correct shift (e.g. compare … Read more

[Solved] How can I convert this function to nodejs [closed]

Node.js has great lib and you can find many php class or libs in node.js now you can use the: node-mcrypt supported algorithm: [ ‘cast-128’, ‘gost’, ‘rijndael-128’, ‘twofish’, ‘arcfour’, ‘cast-256’, ‘loki97’, ‘rijndael-192’, ‘saferplus’, ‘wake’, ‘blowfish-compat’, ‘des’, ‘rijndael-256’, ‘serpent’, ‘xtea’, ‘blowfish’, ‘enigma’, ‘rc2’, ‘tripledes’ ] get here for usage sample: https://github.com/tugrul/node-mcrypt 1 solved How can I … Read more

[Solved] AES. Encrypt array of bytes in powershell [closed]

I am do that i am need. New code: [Reflection.Assembly]::LoadWithPartialName(“System.Security”) $String=$buff #ARRAY OF BYTES TO ENCODE $Passphrase=”Pas” $salt=”My Voice is my P455W0RD!” $init=”Yet another key” $r = new-Object System.Security.Cryptography.AesManaged $pass = [Text.Encoding]::UTF8.GetBytes($Passphrase) $salt = [Text.Encoding]::UTF8.GetBytes($salt) $r.Key = (new-Object Security.Cryptography.PasswordDeriveBytes $pass, $salt, “SHA1″, 5).GetBytes(32) #256/8 $r.IV = (new-Object Security.Cryptography.SHA1Managed).ComputeHash( [Text.Encoding]::UTF8.GetBytes($init) )[0..15] $r.Padding=”Zeros” $c = $r.CreateEncryptor() $ms … Read more

[Solved] Invalid length for a Base-64 char array

The code relevant to your question is this: string sQueryString = txtPassword.Text; byte[] buffer = Convert.FromBase64String(sQueryString); Create a test case for this, containing the data as is entered when you get the error. Perhaps your users don’t input their password as base64. 1 solved Invalid length for a Base-64 char array

[Solved] My basic cipher based encryption method in C++ is not working properly, how can I fix it? [closed]

I suggest placing all your valid characters into a string, then using the % operator. const std::string valid_characters = “abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*”; const unsigned int shift_offset = 13; std::string::size_type position = valid_characters.find(incoming_character); position = (position + shift_offset) % valid_characters.length(); char result = valid_characters[position]; You will have to check the position value because find will return std::string::npos if … Read more

[Solved] Simple password encryption – how do i do? [closed]

In future, I’d suggest you refrain from begging for answers without first showing some code you’ve tried. That being said, I’ll bite. import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; public class EncryptHelper { public static String ehashAndSalt(String passedpass) throws NoSuchAlgorithmException, NoSuchProviderException { String passwordToHash = “password”; String salt = getSalt(); String securePassword = getSecurePassword(passwordToHash, … Read more

[Solved] Vigenere Cipher logic error

There are several problems with your code: You’re error checking isn’t correct. You check if(argc!=2||!apha) after you’ve already evaluated strlen(argv[1]) — by then it’s too late! Check the validity of argc before accessing argv and don’t double up the argument count error and alphabetic key error, they’re independent. Also, error messages should go to stderr, … Read more

[Solved] I am trying to write an encryption in Python. My Problem is that the key is shorter than the message. Therefore I should start again with the key

I am trying to write an encryption in Python. My Problem is that the key is shorter than the message. Therefore I should start again with the key solved I am trying to write an encryption in Python. My Problem is that the key is shorter than the message. Therefore I should start again with … Read more

[Solved] SSL channel is encrypted or data

try to see it like this: whenever you create a secure channel in this type of context, you create 2 endpoints… whatever you stuff into the one endpoint comes out of the other … what you put in may be plain text and it will come out as plain text … but what happens between … Read more

[Solved] Caesar cypher in Python

Use split() numbers = input(“Please type a code: “).split() # [’16’, ’25’, ’20’, ‘8’, ’14’, ‘0’, ‘9’, ‘,19’, ‘0’, ‘3’, ’15’, ’15’, ’12’] Use for .. in .. for num in numbers: print( x[int(num)] ) If you use 0 as space you have to add space at the begginig of list x = [‘ ‘, … Read more

[Solved] Cipher Text Program : Coding Competetion [closed]

First, you’ve been given a terrible specification. It includes a couple of magic numbers without explaining where they came from. I implemented it anyway for fun and got a working program, and here’s what I figured out. Given the key ‘gaurav’: Take the first letter ‘g’. Its “offset” is 6 greater than ‘a’. That is, … Read more