public class RC4 extends Object
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] bs)
解密
|
String |
decrypt(String s) |
byte[] |
encrypt(byte[] bs)
加密
|
String |
encrypt(String s) |
byte[] |
encryptOrDecrypt(byte[] bs)
加密或解密
|
void |
initKey(byte[] key)
初始化密钥
|
void |
initKey(String key) |
public RC4(String key)
public RC4(byte[] key)
public byte[] encrypt(byte[] bs)
bs
- 明文public byte[] decrypt(byte[] bs)
bs
- 密文public byte[] encryptOrDecrypt(byte[] bs)
bs
- 要加密或解密的值public void initKey(String key)
public void initKey(byte[] key)
key
- 密钥Copyright © 2024. All rights reserved.