Package com.esotericsoftware.kryo

Source Code of com.esotericsoftware.kryo.BlowfishSerializerTest

package com.esotericsoftware.kryo;

import javax.crypto.KeyGenerator;

import com.esotericsoftware.kryo.serializers.BlowfishSerializer;
import com.esotericsoftware.kryo.serializers.DefaultSerializers.StringSerializer;

/** @author Nathan Sweet <misc@n4te.com> */
public class BlowfishSerializerTest extends KryoTestCase {
  public void testZip () throws Exception {
    byte[] key = KeyGenerator.getInstance("Blowfish").generateKey().getEncoded();
    kryo.register(String.class, new BlowfishSerializer(new StringSerializer(), key));
    roundTrip(49, 49"abcdefabcdefabcdefabcdefabcdefabcdefabcdef");
  }
}
TOP

Related Classes of com.esotericsoftware.kryo.BlowfishSerializerTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.