예제 #1
0
 public string Dec(String s, String Key)
 {
     byte[] sData   = Convert.FromBase64String(s);
     byte[] seedKey = Encoding.Default.GetBytes(Key);
     return(Encoding.UTF8.GetString(SEED.Decrypt(sData, seedKey)));
 }
예제 #2
0
 public static byte[] Decrypt(byte[] Data, byte[] seedKey)
 {
     return(SEED.Decrypt(Data, seedKey, true));
 }
예제 #3
0
 public static IEnumerable <byte> EncryptWithSeed(this IEnumerable <byte> data,
                                                  IEnumerable <byte> seedKey,
                                                  bool cbcPad = true)
 => SEED.Encrypt(data.ToArray(), seedKey.ToArray(), cbcPad);