RC4 encryption java

后端 未结 6 1005
没有蜡笔的小新
没有蜡笔的小新 2020-12-14 05:12

Hi there I am trying to implement the RC4 algorithm in Java. I found this code as an example that help me to understand the idea:

public class RC4 {
  privat         


        
6条回答
  •  一整个雨季
    2020-12-14 05:31

    Your integer arrays S andT have not been constructed. Hence you get a NullPointerException as soon as you attempt to use them.

    Looking at the rest of the code, I guess they should have been 256-item arrays:

    private int[] S = new int[256];
    private int[] T = new int[256];
    

提交回复
热议问题