Java 类com.esotericsoftware.kryo.serializers.BlowfishSerializer 实例源码

项目:jstorm-0.9.6.3-    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String) storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException(
                    "Blowfish encryption key not specified");
        }
        byte[] bytes = Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(),
                bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:learn_jstorm    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String) storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException(
                    "Blowfish encryption key not specified");
        }
        byte[] bytes = Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(),
                bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:Tstream    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String) storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException(
                    "Blowfish encryption key not specified");
        }
        byte[] bytes = Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(),
                bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:jstrom    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String) storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException("Blowfish encryption key not specified");
        }
        byte[] bytes = Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(), bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:incubator-storm    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String)storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException("Blowfish encryption key not specified");
        }
        byte[] bytes =  Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(), bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:storm-resa    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String)storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException("Blowfish encryption key not specified");
        }
        byte[] bytes =  Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(), bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:jstorm    文件:BlowfishTupleSerializer.java   
public BlowfishTupleSerializer(Kryo kryo, Map storm_conf) {
    String encryption_key = null;
    try {
        encryption_key = (String) storm_conf.get(SECRET_KEY);
        LOG.debug("Blowfish serializer being constructed ...");
        if (encryption_key == null) {
            throw new RuntimeException("Blowfish encryption key not specified");
        }
        byte[] bytes = Hex.decodeHex(encryption_key.toCharArray());
        _serializer = new BlowfishSerializer(new ListDelegateSerializer(), bytes);
    } catch (org.apache.commons.codec.DecoderException ex) {
        throw new RuntimeException("Blowfish encryption key invalid", ex);
    }
}
项目:kryo-mavenized    文件:BlowfishSerializerTest.java   
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");
}