关于PHP和JAVA之间的AES加密互通问题

公司今日接到一个需求,要与银行方面进行对接,接收银行方面 推送过来的加密信息,解密后入库进行统计,由于银行方是JAVA环境,我司是PHP环境,所以需要写一个PHP的解密方法,查阅各种文档后还是无法满足需求,无法进行解密,特来求助.

银行方只有一个加密流程文档:
加密方式:AES/ECB/PKCS5Padding

1、将data中的字段转成json格式如下:

{"userId":"12345678911111233","state":"2","cardNo":"625966","time":"20171212","extInfo":""}

2、URLEncode对josn字符串进行编码UTF-8防止中文乱码

    URLEncoder.encode(data, "UTF-8")

    %7B%22userId%22%3A%2212345678911111233%22%2C%22state%22%3A%222%22%2C%22cardNo%22%3A%22625966%22%2C%22time%22%3A%2220171212%22%2C%22extInfo%22%3A%22%22%7D

3、使用aesKey对URLEncode后的字符串进行AES加密, 得到data:

    aesKey=Spdbccc-testtest

    XBD5nXa7oAnsWo/l843zUfmuhpmWGKEieJoJXxZEHPun1zfQhEPBFKv5kXZMM8i2Vr9RJwZeW/zn6OScGSlRTNVaytu2M5CDABw6B1grqxCqjTu/fKTp3hpMJd0riMB7H7ZK5xGUBu2nGgacjPmVcVl8Xm34fdArx17DkHbHqOWgiwmesk0C/lgKK7hkyuiuVtEQPmc02Ipjx3JGyJ+59g==

我这边先是按照查询的文档中所说直接使用PHP自带的mcrypt扩展进行解密,发现php7.2已经弃用该扩展,换成openssl方式使用AES-128-ECB进行解密返回值是false;后来我转变思路,先用openssl以AES-128-ECB模式对第二步的串进行加密,获取到的结果和步骤三中的完全不一样,我改用先获取openssl的加密模式列表然后循环加密,输出各个加密方式的结果,发现没有一个能对上,到此以我的水平已经不知道该如何进行下一步了,特来求助!

2个回答

可以试试下面这种AES加密解密方式看行不行

class AES {

    /**
     *
     * @param string $string 需要加密的字符串
     * @param string $key 密钥
     * @return string
     */
    public static function encrypt($string, $key)
    {

        // openssl_encrypt 加密不同Mcrypt,对秘钥长度要求,超出16加密结果不变
        $data = openssl_encrypt($string, 'AES-128-ECB', $key, OPENSSL_RAW_DATA);

        $data = strtolower(bin2hex($data));

        return $data;
    }


    /**
     * @param string $string 需要解密的字符串
     * @param string $key 密钥
     * @return string
     */
    public static function decrypt($string, $key)
    {
        $decrypted = openssl_decrypt(hex2bin($string), 'AES-128-ECB', $key, OPENSSL_RAW_DATA);

        return $decrypted;
    }
}

$sk = '0123456789abcdef';

$str = '测试字符串123abc';
$strEn = Aes::encrypt($str, $sk);//加密

echo '<meta charset="UTF-8">';
echo '加密后=' , $strEn , '<br>';

$strDe =  Aes::decrypt($strEn, $sk);//解密
echo '解密后=' , $strDe , '<br>';
weixin_41604354
无能为力者的梦 e1d7c356a4927dbda81062b4306c763221d149c314169aae7ddb84551fc416fb720edae11eda22074960c1ace0efa8973fc4aa7415d407770d707055d76cf5e4a7ad423c81d0ab2dee8471ced5b77c6263084e141a82ef4bd1ecd104d58a139d6af281651f0eaf8b84e5db94862296bbc1d573fc870dcb431920fc15abf85fe5e77a879082b9d79c5918d4cb7333ffade5b6b5ef2cab67d0a9b6a1602214ab6a
大约一年之前 回复
weixin_41604354
无能为力者的梦 不行呀,我用步骤2的串进行加密,得不到步骤3的串,难道是那边给我的文档有问题?
大约一年之前 回复

他们可能使用的是对称加密,用的是二进制,你这个的问他们的技术 如何实现的,看一下Java的代码

ldTrueLove
林子懿 回复无能为力者的梦: 银行就这样,没办法
大约一年之前 回复
weixin_41604354
无能为力者的梦 今天确定了,是文档有问题,给了我一个错误的文档,气死我了,还说要沟通,我之前天天沟通,一问三不知,真是气愤
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
c#和java aes加密互通的问题

c#段的代码是这样的: public static string AESEncrypt(string EncryptString) { if (string.IsNullOrEmpty(EncryptString)) { throw (new Exception("密文不得为空")); } if (string.IsNullOrEmpty(EncryptKey1)) { throw (new Exception("密钥不得为空")); } string m_strEncrypt = ""; byte[] m_btIV = Convert.FromBase64String("Rkb4jvUy/ye7Cd7k89QQgQ=="); Rijndael m_AESProvider = Rijndael.Create(); try { byte[] m_btEncryptString = Encoding.Default.GetBytes(EncryptString); MemoryStream m_stream = new MemoryStream(); CryptoStream m_csstream = new CryptoStream(m_stream, m_AESProvider.CreateEncryptor(Encoding.Default.GetBytes(EncryptKey1), m_btIV), CryptoStreamMode.Write); m_csstream.Write(m_btEncryptString, 0, m_btEncryptString.Length); m_csstream.FlushFinalBlock(); m_strEncrypt = Convert.ToBase64String(m_stream.ToArray()); m_stream.Close(); m_stream.Dispose(); m_csstream.Close(); m_csstream.Dispose(); } catch (IOException ex) { throw ex; } catch (CryptographicException ex) { throw ex; } catch (ArgumentException ex) { throw ex; } catch (Exception ex) { throw ex; } finally { m_AESProvider.Clear(); } return m_strEncrypt; } 请问用java怎么实现加密,得到的加密后的结果一致

CryptoJS aes256加密与java aes256加密互通怎么做

CryptoJS aes256加密与java aes256加密互通怎么做,KEY与IV怎么同步比较安全

JAVA AES ECB加密到Golang迁移

<div class="post-text" itemprop="text"> <p>I try to port a Java implementation of AES decryption to Golang. I need to decrypt data that is previously encrypted by the JAVA code using Golang. But so far I have no luck decrypting it.</p> <p>The Java code is:</p> <pre><code>private static byte[] pad(final String password) { String key; for (key = password; key.length() &lt; 16; key = String.valueOf(key) + key) {} return key.substring(0, 16).getBytes(); } public static String encrypt(String password, String message) throws Exception { SecretKeySpec skeySpec = new SecretKeySpec(pad(password), "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(1, skeySpec); byte[] encrypted = cipher.doFinal(message.getBytes()); return Hex.encodeHexString(encrypted); } public static String decrypt(String password, String message) throws Exception { SecretKeySpec skeySpec = new SecretKeySpec(pad(password), "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(1, skeySpec); cipher.init(2, skeySpec); byte[] original = cipher.doFinal(Hex.decodeHex(message.toCharArray())); return new String(original); } </code></pre> <p>I tried implementations like <a href="https://gist.github.com/JonCooperWorks/5a07d21f930f0c4072d47790b0fe8662" rel="nofollow noreferrer">Cryptography GIST</a> or </p> <pre><code>func decrypt(passphrase, data []byte) []byte { cipher, err := aes.NewCipher([]byte(passphrase)) if err != nil { panic(err) } decrypted := make([]byte, len(data)) size := 16 for bs, be := 0, size; bs &lt; len(data); bs, be = bs+size, be+size { cipher.Decrypt(decrypted[bs:be], data[bs:be]) } return decrypted } hx, _ := hex.DecodeString(hexString) res := decrypt([]byte(password), hx) </code></pre> <p>No error is thrown, and a string is returned. But this string is not anywhere close to the encrypted data. Any help is very much appreciated! Thanks!</p> </div>

android端和java aes加密结果不同

用的org.apache下的commons-codec,android端改了包名导入进去的。 用相同密钥两个平台加密结果不同 代码如下: ![图片说明](https://img-ask.csdn.net/upload/201709/18/1505745042_855033.png) ![图片说明](https://img-ask.csdn.net/upload/201709/18/1505745048_892848.png) ![图片说明](https://img-ask.csdn.net/upload/201709/18/1505745054_210653.png) ![图片说明](https://img-ask.csdn.net/upload/201709/18/1505745058_779693.png)

使用相同密钥的AES加密在Java和PHP中生成不同的值

<div class="post-text" itemprop="text"> <p>In PHP, I am unable to decrypt a string encrypted in java using AES CBC 128 bit. I have tried bott phpseclib and openssl on the PHP side. Though my preference is for phpseclib.</p> <p><strong>Java Side</strong></p> <ol> <li><p>I generated an AES 128 bit key using:</p> <pre><code>keyGen = KeyGenerator.getInstance("AES"); keyGen.init(128); secretKey = keyGen.generateKey(); </code></pre></li> <li><p>Generated an initialization vector by getting bytes from a string:</p> <pre><code>byte[] iv = "myuniqueivparam".getBytes("UTF-8"); </code></pre></li> <li><p>Encrypted a string as follows:</p> <pre><code>Cipher enCipher = Cipher.getInstance("AES/CBC/PKCS7Padding"); </code></pre> <p>// the key and iv are passed on to php as strings</p></li> </ol> <p><strong>PHP side</strong></p> <ol> <li><p>Set the algorithm:</p> <pre><code>$aes = new Crypt_AES(CRYPT_AES_MODE_CBC); </code></pre></li> <li><p>The key and iv I got from java are passed as strings:</p> <pre><code>$aes-&gt;setKey($userKey); $aes-&gt;setKeyLength(128); // when I echo this I get myuniqueivparam $ivdecode=base64_decode($iv); $aes-&gt;setIV($ivdecode); </code></pre></li> <li><p>Set the same input and add padding</p> <pre><code>$input="winning"; $blocksize = 16; $pad1=$blocksize -(strlen($input) %$blocksize); $input1=$input . str_repeat(chr($pad1), $pad1); </code></pre></li> <li><p>Encrypted the string using phpseclib:</p> <pre><code>$aes = new Crypt_AES(CRYPT_AES_MODE_CBC); $dummy = base64_encode($aes-&gt;encrypt($input1)); echo $dummy; </code></pre></li> <li><p><code>$decryptedstring=$aes-&gt;decrypt($encryptedStringInJava);</code></p></li> </ol> <p><strong>Issues</strong></p> <ol> <li><p>When I print <code>$dummy</code>, in step 4, the encrypted string that I get does not match the encrypted string from java.</p></li> <li><p>Decrypting <code>$encryptedStringInJava</code> is not working in PHP (step 5)</p></li> </ol> <p>I have tried encryption/decryption in java using both phpseclib and openssl. </p> </div>

pythonAES加密使用CBC模式与JAVA的CBC加密结果不同!求解!

JAVA的AES加密示例 import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import java.nio.charset.StandardCharsets; import java.util.Base64; public class AesUtil { private static final String KEY_ALGORITHM = "AES"; private static final String DEFAULT_CIPHER_ALGORITHM = "AES/CBC/PKCS5Padding"; public static String encrypt(String strKey, String strIn) throws Exception { SecretKeySpec skeySpec = getKey(strKey); Cipher cipher = Cipher.getInstance(DEFAULT_CIPHER_ALGORITHM); IvParameterSpec iv = new IvParameterSpec(strKey.getBytes()); cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv); byte[] encrypted = cipher.doFinal(strIn.getBytes()); String aesResult = new String(Base64.getEncoder().encode(encrypted), StandardCharsets.UTF_8); return aesResult.replace("/", "_"); } private static SecretKeySpec getKey(String strKey) throws Exception { byte[] arrBTmp = strKey.getBytes(); byte[] arrB = new byte[16]; for (int i = 0; i < arrBTmp.length && i < arrB.length; i++) { arrB[i] = arrBTmp[i]; } return new SecretKeySpec(arrB, KEY_ALGORITHM); } } 这个是我用python写的AES加密 from Crypto.Cipher import AES import base64 from time import sleep class aescrypt: def __init__(self, key, model, iv, encode_): self.encode_ = encode_ self.model = {'ECB': AES.MODE_ECB, 'CBC': AES.MODE_CBC}[model] self.key = self.add_16(key) if model == 'ECB': self.aes = AES.new(self.key, self.model) # 创建一个aes对象 elif model == 'CBC': self.aes = AES.new(self.key, self.model, iv, segment_size=128) # 创建一个aes对象 elif model == 'CFB': self.aes = AES.new(self.key, self.model) # 这里的密钥长度必须是16、24或32 def add_16(self, par): par = par.encode(self.encode_) while len(par) % 16 != 0: par += b'n' return par def aesencrypt(self, text): # 此处text传入的值为cleartext text = self.add_16(text) print(text) self.encrypt_text = self.aes.encrypt(text) return base64.encodebytes(self.encrypt_text).decode().strip() def aesdecrypt(self, text): text = base64.decodebytes(text.encode(self.encode_)) self.decrypt_text = self.aes.decrypt(text) return self.decrypt_text.decode(self.encode_).strip('\0') if __name__ == '__main__': keyy = input("输入密钥:") cleartext = input("输入明文:") pr = aescrypt(keyy, 'CBC', IV, 'utf8'),此处为加密模式及内容,IV en_text = pr.aesencrypt(cleartext) print('密文:', en_text) print('明文:', pr.aesdecrypt(en_text)) 这里我写了两个加密模式,上述代码已经换成同样的CBC模式加密

使用Go和PHP进行AES加密

<div class="post-text" itemprop="text"> <p>I am using AES encryption in Go and PHP. But both the languages does not encrypt/decrypt each other ciphertext. Following i have tried in php</p> <pre><code> class Crypto { private $encryptKey = "keyforencryption"; private $iv = 'ivusedforencrypt'; private $blocksize = 16; public function encrypt($toEncrypt){ $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CFB); //$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); return base64_encode($this-&gt;iv . mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this-&gt;encryptKey, $toEncrypt, MCRYPT_MODE_CFB, $this-&gt;iv)); } public function decrypt($toDecrypt){ $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CFB);//$this-&gt;blocksize; $toDecrypt = base64_decode($toDecrypt); return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this-&gt;encryptKey, substr($toDecrypt, $iv_size), MCRYPT_MODE_CFB, substr($toDecrypt, 0, $iv_size))); } } $c = new Crypto(); echo "Encrypted : ".$e = $c-&gt;encrypt("test"); echo "&lt;br/&gt;Decrypted : ".$c-&gt;decrypt($e); </code></pre> <p>output : aXZ1c2VkZm9yZW5jcnlwdDpdZEinU2rB</p> <p>and this one in Go with AES</p> <pre><code> package main import ( "crypto/aes" "crypto/cipher" "crypto/rand" "encoding/base64" "errors" "fmt" "io" "log" ) func main() { key := []byte("keyforencryption") plaintext := []byte("test") fmt.Printf("%s ", plaintext) ciphertext, err := encrypt(key, plaintext) if err != nil { log.Fatal(err) } b := base64.StdEncoding.EncodeToString(ciphertext) fmt.Printf("Encrypted text : %s ", b) result, err := decrypt(key, b) if err != nil { log.Fatal(err) } fmt.Printf("Decrypted Text : %s ", result) } func encrypt(key, text []byte) ([]byte, error) { block, err := aes.NewCipher(key) if err != nil { return nil, err } //b := base64.StdEncoding.EncodeToString(text) ciphertext := make([]byte, aes.BlockSize+len(text)) iv := ciphertext[:aes.BlockSize] if _, err := io.ReadFull(rand.Reader, iv); err != nil { return nil, err } cfb := cipher.NewCFBEncrypter(block, iv) cfb.XORKeyStream(ciphertext[aes.BlockSize:], []byte(text)) return ciphertext, nil } func decrypt(key []byte, text1 string) ([]byte, error) { text, _ := base64.StdEncoding.DecodeString(string(text1)) block, err := aes.NewCipher(key) if err != nil { return nil, err } if len(text) &lt; aes.BlockSize { return nil, errors.New("ciphertext too short") } iv := text[:aes.BlockSize] text = text[aes.BlockSize:] cfb := cipher.NewCFBDecrypter(block, iv) cfb.XORKeyStream(text, text) b := base64.StdEncoding.EncodeToString(text) data, err := base64.StdEncoding.DecodeString(string(b)) if err != nil { return nil, err } return data, nil } </code></pre> <p>output : ZVnhCXjIvtGKBdqvjwHRZKcVy34=</p> <p>any help would be appreciable.</p> </div>

通过js做出的aes加密与java后台加密出来的不同 求帮助我js 应该修改哪里?

这是java后台的加密 ``` public static String aesEncrypt(String content, String encryptKey) throws Exception { KeyGenerator kgen = KeyGenerator.getInstance("AES"); SecureRandom random=SecureRandom.getInstance("SHA1PRNG"); random.setSeed(encryptKey.getBytes()); kgen.init(128, random); SecretKey secretKey = kgen.generateKey(); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, secretKey); byte[] encryptDataByte = cipher.doFinal(content.getBytes("utf-8")); //将二进制转换成16进制 String hexStr = parseByte2HexStr(encryptDataByte); //转换为base64 String encodeStr = Base64.encodeBase64String(hexStr.getBytes()); return encodeStr; } ``` java后台将二进制转换成16进制 ``` /** * 将二进制转换成16进制 * @method parseByte2HexStr * @param buf * @return * @throws * @since v1.0 */ public static String parseByte2HexStr(byte buf[]){ StringBuffer sb = new StringBuffer(); for(int i = 0; i < buf.length; i++){ String hex = Integer.toHexString(buf[i] & 0xFF); if (hex.length() == 1) { hex = '0' + hex; } sb.append(hex.toUpperCase()); } return sb.toString(); } ``` 这是我用JS写的加密 用的CryptoJS ``` encrypt(word, keyStr) { // 加密 var key = CryptoJS.enc.Utf8.parse(keyStr); var srcs = CryptoJS.enc.Utf8.parse(word) var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) //console.log("encrypted===" + encrypted.toString()) var base64Str = CryptoJS.enc.Base64.stringify(encrypted.toString()); //转16进制 var dataString = strToHexCharCode(encrypted.toString()); // //base64加密 dataString = window.btoa(dataString.toString()); console.log(dataString); return dataString; }, //转16进制 function strToHexCharCode(str) { if (str === "") return ""; var hexCharCode = []; //hexCharCode.push("0x"); for (var i = 0; i < str.length; i++) { hexCharCode.push((str.charCodeAt(i)).toString(16)); } return hexCharCode.join(""); } ```

用C#解密JAVA的AES加密字符串

附JAVA的加密方法 public static String encrypt(String s, String token) { try { byte[] key = Hex.toBytes(token); return encryptBase64URLSafe(s, key); } catch (Exception e) { // e.printStackTrace(); return null; } } public static byte[] toBytes(String s) { int len = s.length(); byte[] data = new byte[len / 2]; for (int i = 0; i < len; i += 2) { data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16)); } return data; } private static String encryptBase64URLSafe(String s, byte[] key) { BaseEncoding b64 = BaseEncoding.base64Url().omitPadding(); byte[] encryptedBytes = encryptBytes(s, key); return b64.encode(encryptedBytes); } private static byte[] encryptBytes(String s, byte[] key) { if (key == null) { return null; } // 判断Key是否为16位 if (key.length != 16) { return null; } SecretKeySpec skeySpec = new SecretKeySpec(key, "AES"); try { Cipher cipher = Cipher.getInstance(ALGORITHM); cipher.init(Cipher.ENCRYPT_MODE, skeySpec); byte[] encrypted = cipher.doFinal(s.getBytes("utf-8")); return encrypted; } catch (Exception e) { return null; } } 这个用C#怎么解密啊,大家帮帮忙,我尝试了很多方法都不行 在Convert.FromBase64String(encryptedText);时就报错

使用Java和PHP的AES CBC 128位加密

<div class="post-text" itemprop="text"> <p>I have recently used the AES CBC 128 algorithm in Java in order to cipher data. Now I need to rebuild that algorithm in PHP, but I have no idea how, because PHP algorithms on the internet return different results. Maybe you can help me. </p> <p>This is the Java-code to encrypt:</p> <pre><code>private SecretKeySpec secretKey; private IvParameterSpec ivSpec; public void setKey(String myKey) { MessageDigest sha = null; try { byte[] key = myKey.getBytes("UTF-8"); sha = MessageDigest.getInstance("SHA-1"); key = sha.digest(key); key = Arrays.copyOf(key, 16); secretKey = new SecretKeySpec(key, "AES"); byte[] iv = new String("1010101010101010").getBytes("UTF-8"); ivSpec = new IvParameterSpec(iv); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } public String encrypt(String strToEncrypt) { try { Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivSpec); return Base64.encode(cipher.doFinal(strToEncrypt.getBytes("UTF-8"))); } catch (Exception e) { e.printStackTrace(); } return null; } public String decrypt(String strToDecrypt) { try { Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, secretKey, ivSpec); return new String(cipher.doFinal(Base64.decode(strToDecrypt))); } catch (Exception e) { e.printStackTrace(); } return null; } public static void main(String[] args) { AESText aes = new AESText(); final String secretKey = "com.secure.test.projectjasdS/FjkGkGhkGjhG786Vjfg=tjGFGH"; aes.setKey(secretKey); String originalString = "test set se ts et set s et se"; String encryptedString = aes.encrypt(originalString); String decryptedString = aes.decrypt(encryptedString); System.out.println("origin: " + originalString); System.out.println("encrypted: " + encryptedString); System.out.println("decrypted: " + decryptedString); } </code></pre> <p>This is my php code:</p> <pre><code> protected $key; protected $method = 'AES-128-CBC'; protected $iv = '1010101010101010'; protected $option = OPENSSL_CIPHER_AES_128_CBC; function __construct($key) { $this-&gt;key = $key; } public function encrypt($data) { if (is_null($data)) { return "Error " . INVALID_PARAMS_ENCRYPTIONS . ": Data is null "; } $enc = openssl_encrypt($data, $this-&gt;method, $this-&gt;key, $this-&gt;option, $this-&gt;iv); return base64_encode($enc); } public function decrypt($data) { if (is_null($data)) { return "Error " . INVALID_PARAMS_ENCRYPTIONS . ": Data is null "; } $data = base64_decode($data); $dec = openssl_decrypt($data, $this-&gt;method, $this-&gt;key, $this-&gt;option, $this-&gt;iv); return $dec; } </code></pre> <p>When I encrypted data from java encryption, This result cannot decrypt on Php decryption.</p> <p>Can you guys possibly help me with building a PHP script, that returns the same results with java encryption?</p> </div>

Golang中的AES加密和Java中的解密

<div class="post-text" itemprop="text"> <p>I have the following AES Encryption function written in Golang.</p> <pre><code>func encrypt(key []byte, text string) string { plaintext := []byte(text) block, err := aes.NewCipher(key) if err != nil { panic(err) } ciphertext := make([]byte, aes.BlockSize+len(plaintext)) iv := ciphertext[:aes.BlockSize] if _, err := io.ReadFull(rand.Reader, iv); err != nil { panic(err) } stream := cipher.NewCFBEncrypter(block, iv) stream.XORKeyStream(ciphertext[aes.BlockSize:], plaintext) return base64.URLEncoding.EncodeToString(ciphertext) } </code></pre> <p>I am struggling to understand the flow to decrypt the generated text using Java. Any help will be highly appreciated!</p> <p>Here is the Scala code, Not sure what's the problem with it.</p> <pre><code>def decode(input:String) = { val keyBytes = Hex.decodeHex("someKey".toCharArray) val inputWithoutPadding = input.substring(0,input.size - 2) val inputArr:Seq[Byte] = Hex.decodeHex(inputWithoutPadding.toCharArray) val skSpec = new SecretKeySpec(keyBytes, "AES") val iv = new IvParameterSpec(inputArr.slice(0,16).toArray) val dataToDecrypt = inputArr.slice(16,inputArr.size) val cipher = Cipher.getInstance("AES/CFB/NoPadding") cipher.init(Cipher.DECRYPT_MODE, skSpec, iv) cipher.doFinal(dataToDecrypt.toArray) } </code></pre> </div>

下面Java的AES加密,用c#怎么实现?要一样的结果哦

public static String encrypt(String content, String key) { try { KeyGenerator kgen = KeyGenerator.getInstance("AES"); SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); random.setSeed(key.getBytes()); kgen.init(128, random); SecretKey secretKey = kgen.generateKey(); byte[] enCodeFormat = secretKey.getEncoded(); SecretKeySpec secretKeySpec = new SecretKeySpec(enCodeFormat, "AES"); Cipher cipher = Cipher.getInstance("AES"); byte[] byteContent = content.getBytes("utf-8"); cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); byte[] byteRresult = cipher.doFinal(byteContent); StringBuffer sb = new StringBuffer(); for (int i = 0; i < byteRresult.length; i++) { String hex = Integer.toHexString(byteRresult[i] & 0xFF); if (hex.length() == 1) { hex = '0' + hex; } sb.append(hex.toUpperCase()); } return sb.toString(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (NoSuchPaddingException e) { e.printStackTrace(); } catch (InvalidKeyException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (IllegalBlockSizeException e) { e.printStackTrace(); } catch (BadPaddingException e) { e.printStackTrace(); } return null; }

懂java和php来,aes加解密将java版转为php版

/** * AES加密 * * @param key * 密钥信息 * @param content * 待加密信息 */ public static byte[] encodeAES(byte[] key, byte[] content) throws Exception { // 不是16的倍数的,补足 int base = 16; if (key.length % base != 0) { int groups = key.length / base + (key.length % base != 0 ? 1 : 0); byte[] temp = new byte[groups * base]; Arrays.fill(temp, (byte) 0); System.arraycopy(key, 0, temp, 0, key.length); key = temp; } SecretKey secretKey = new SecretKeySpec(key, "AES"); IvParameterSpec iv = new IvParameterSpec(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, secretKey, iv); byte[] tgtBytes = cipher.doFinal(content); return tgtBytes; }

在PHP代码加密中转换Java AES加密

<div class="post-text" itemprop="text"> <p>I am trying to encrypt the otp in php. i have the java code that encrypt the otp and when i send that encrypted otp it decrypt at client end as expected. but when i encrypt it using php, decryption does not work.</p> <p>Actual Java Encryption:</p> <pre><code>public static final String appKey = "wbx+mGnapzZMietP0gK6muJb/vUU7jnAk9Fe5gTHh4w="; public static String encryptEK(byte[] plainText, byte[] secret){ try{ SecretKeySpec sk = new SecretKeySpec(secret, AES_ALGORITHM); ENCRYPT_CIPHER.init(Cipher.ENCRYPT_MODE, sk); return Base64.encodeBase64String(ENCRYPT_CIPHER.doFinal(plainText)); }catch(Exception e){ e.printStackTrace(); return ""; } } public static String encryptOTP(String otp) { String encryptedOtp = null; try { encryptedOtp = encryptEK(otp.getBytes(),decodeBase64StringTOByte(appKey)); } catch (Exception e) { e.printStackTrace(); } return encryptedOtp; } </code></pre> <blockquote> <p>encryptOTP("251826")</p> </blockquote> <p>Current PhP encryption.</p> <pre><code> class AtomAES { public function encrypt_aps_secret($data = '', $key = NULL) { if($key != NULL &amp;&amp; $data != ""){ $method = "AES-256-ECB"; $encrypted = openssl_encrypt($data, $method, $key, OPENSSL_RAW_DATA); $result = base64_encode($encrypted); return $result; }else{ return "String to encrypt, Key is required."; } } } $appKey = mb_convert_encoding("wbx+mGnapzZMietP0gK6muJb/vUU7jnAk9Fe5gTHh4w=", "UTF-8"); $enc_otp = $atomAES-&gt;encrypt_aps_secret("251826", base64_decode(base64_encode($appKey))); print_r(json_encode(array("enc_otp"=&gt;mb_convert_encoding($enc_otp, "UTF-8")))); </code></pre> <p>I need the exact encryption as java does using php. how to achieve this</p> </div>

Android Java和PHP加密(AES)不匹配

<div class="post-text" itemprop="text"> <p>So I have this line of code:</p> <pre><code>$signature = openssl_decrypt(base64_decode($signature), 'AES-256-CBC', $apiKey-&gt;private_key, 0, $iv); </code></pre> <p>And in my Android application I have this:</p> <pre><code>public String encrypt(String message, String privateKey) throws Exception{ Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); IvParameterSpec iv = makeIv(); cipher.init(Cipher.ENCRYPT_MODE, makeKey(privateKey), iv); return Base64.encodeToString(cipher.doFinal(message.getBytes()), Base64.DEFAULT); } </code></pre> <p>And when I encrypt something in Java and send it to PHP, there, I get different output from decryption following with signature check failure.</p> <p>What is the right way to encrypt on <code>Java/Android</code> side so that I can decrypt it in PHP like the line above shows? </p> <p>Note: Do not worry about IV as I have a mechanism of exchanging it so I am using the same one for encryption and decryption.</p> </div>

如何解决AES加密在不同jdk版本,openjdk和sunjdk中加密结果不同的问题

在AES加密的时候服务器使用的是openjdk,然后程序跑的时候就会出错,同一个加密内容,同一个key,每次加密后的结果都不同,并且解密的时候会报错invalid pad value!

Java实现AES256位对称加密算法要替换什么包才能实现

Java语言实现AES256对称加密算法要替换掉什么包才能实现? 官方文档: http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html 希望能得到各位朋友支援下

Java AES-256加密文件之后解密文件,文件被损坏

public static Cipher initAESCipher(String password, int cipherMode) { // 创建Key gen KeyGenerator keyGenerator = null; Cipher cipher = null; try { keyGenerator = KeyGenerator.getInstance("AES"); keyGenerator.init(256, new SecureRandom(password.getBytes())); SecretKey secretKey = keyGenerator.generateKey(); byte[] codeFormat = secretKey.getEncoded(); SecretKeySpec key = new SecretKeySpec(codeFormat, "AES"); cipher = Cipher.getInstance("AES/ECB/PKCS7Padding","BC"); // 初始化 cipher.init(cipherMode, key); return cipher; } catch (NoSuchAlgorithmException e) { e.printStackTrace(); // To change body of catch statement use File | } catch (NoSuchPaddingException e) { e.printStackTrace(); // To change body of catch statement use File | } catch (InvalidKeyException e) { e.printStackTrace(); // To change body of catch statement use File | } catch (NoSuchProviderException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } ``` ``` public static void encrypt(File source, File target, String password) throws Exception { InputStream input = new FileInputStream(source); OutputStream ouput = new FileOutputStream(target); logger.debug("开始写入加密文件"); long start = System.currentTimeMillis(); CipherInputStream cipherInputStream = (CipherInputStream) encrypt(input, password); IOUtils.copy(cipherInputStream,ouput ); cipherInputStream.close(); input.close(); ouput.close(); logger.debug("完成文件加密,耗时:" + (System.currentTimeMillis() - start)); } ``` ``` public static InputStream encrypt(InputStream input, String password) { logger.debug("开始加密文件流"); long start = System.currentTimeMillis(); Cipher cipher = initAESCipher(password, Cipher.ENCRYPT_MODE); logger.debug("生成密钥耗时:" + (System.currentTimeMillis() - start)); Assert.notNull(cipher); // 以加密流写入文件 CipherInputStream cipherInputStream = new CipherInputStream(input, cipher); logger.debug("完成加密文件流,耗时:" + (System.currentTimeMillis() - start)); return cipherInputStream; } ``` ``` 目前发现加密DOCX,PPTX,ZIP等压缩类文件之后进行解密会产生头信息被损坏的现象,望各位大神提供下解决思路。

在PHP中复制Java的AES / CBC / PKCS5Padding加密

<div class="post-text" itemprop="text"> <p>Have included the java and php code and outputs below. Goal is to get the java checksum value in php. As can be seen I have the same inputs in php as in java and though I have tried a lot of variations of arguments in php's openssl_encrypt function but not able to get the desired output. Help to resolve this will be much appreciated! Do note that the java code is authoritative, any changes needed would be in php only.</p> <p>Java code : </p> <pre><code>import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Base64; import java.io.ByteArrayOutputStream; public class ChecksumGen { public static void main(final String[] args) { String data = "INPUTDATA"; String secretKey = "0000000000000000000000000000000000000000000000000000000000000000"; byte[] iv = new byte[16]; try { byte[] hashedData = getDigest(data); byte[] key = hexStringToByteArray(secretKey); byte[] checksum = encrypt(key, hashedData, iv); showB64("key ", key); showB64("iv ", iv); showB64("hashedData ", hashedData); showB64("checksum ", checksum); } catch (Exception ex) { throw new RuntimeException(ex); } } public static byte[] getDigest(String checkSumInput) { try { MessageDigest localMessageDigest = MessageDigest.getInstance("SHA-256"); byte[] checkSumInputBytes = checkSumInput.getBytes("UTF-8"); localMessageDigest.update(checkSumInputBytes); byte[] digest = localMessageDigest.digest(); return digest; } catch (NoSuchAlgorithmException | UnsupportedEncodingException ex) { throw new RuntimeException(ex); } } public static byte[] hexStringToByteArray(String s) { byte[] b = new byte[s.length() / 2]; for (int i = 0; i &lt; b.length; i++) { int index = i * 2; int v = Integer.parseInt(s.substring(index, index + 2), 16); b[i] = (byte) v; } return b; } public static byte[] encrypt(byte[] key,byte[] data, byte[] iv)throws Exception{ SecretKeySpec secretKeySpec = new SecretKeySpec(key, "AES"); IvParameterSpec ivSpec = new IvParameterSpec(iv); Cipher acipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); acipher.init(Cipher.ENCRYPT_MODE, secretKeySpec,ivSpec); byte[] arrayOfByte1 = acipher.doFinal(data); return arrayOfByte1; } public static void showB64(String label, byte[] rawData) { System.out.println(label + ":" + Base64.getEncoder().encodeToString(rawData)); } } </code></pre> <p>PHP code :</p> <pre><code>&lt;?php $data = "INPUTDATA"; $hashedData = hash("sha256", $data, true); $secretKey = "0000000000000000000000000000000000000000000000000000000000000000"; $ivStr = "00000000000000000000000000000000"; $key = pack('H*', $secretKey); $iv = pack('H*', $ivStr); $inputData = pkcs5_pad($hashedData, 16); showB64('key', $key); showB64('iv', $iv); showB64('hashedData', $hashedData); showB64('inputData', $inputData); $checksum = encrypt($key, $inputData, $iv); showB64('checksum', $checksum); function encrypt($key,$data,$iv){ $cipher = 'AES-128-CBC'; $options = OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING; $raw = openssl_encrypt( $data, $cipher, $key, $options, $iv ); return $raw; } function pkcs5_pad($text, $blocksize){ $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad), $pad); } function showB64($label, $rawData) { echo "{$label} :".base64_encode($rawData)." "; } </code></pre> <p>Java output :</p> <pre><code>key :AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= iv :AAAAAAAAAAAAAAAAAAAAAA== hashedData :ZAgNCUfIbdT9EjdkCb3XDNpMFGV34rXNjcTOQ9cdZ3w= checksum :9NS/ZKMscpa4V7i2YQQPoycxCwbL1BlK3h9O/1ujoD1iYgjE8tZx+JRGflw5WikH </code></pre> <p>PHP output :</p> <pre><code>key :AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= iv :AAAAAAAAAAAAAAAAAAAAAA== hashedData :ZAgNCUfIbdT9EjdkCb3XDNpMFGV34rXNjcTOQ9cdZ3w= inputData :ZAgNCUfIbdT9EjdkCb3XDNpMFGV34rXNjcTOQ9cdZ3wQEBAQEBAQEBAQEBAQEBAQ checksum :LtdJzSl9UgEpZrpdg7X5g5CYqE3eXQvijazrvkw0XFNY2bxn8zGp1ea8DrUmw/uu </code></pre> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐