Examples of Base64Codec


Examples of com.mongodb.util.Base64Codec

            private byte[] serverSignature;
            private int step;

            ScramSha1SaslClient(MongoCredential credential) {
                this.credential = credential;
                this.base64Codec = new Base64Codec();
            }
View Full Code Here

Examples of org.jwall.web.audit.util.Base64Codec

        byte[] data = evt.toString().getBytes();
        String hash = "md5:"+MD5.md5( data );

        String sum = ConcurrentAuditWriter.createSummary( evt );
        Base64Codec codec = new Base64Codec();
        String cred = new String( codec.encode( ( user + ":" + pass ).getBytes() ) );
        String ua = "jwall.org/Collector Version " + Collector.VERSION;
        Socket sock = this.getSocketConnection();

        try {
           
View Full Code Here

Examples of org.jwall.web.audit.util.Base64Codec

        byte[] data = evt.toString().getBytes();
        String hash = "md5:"+MD5.md5( data );

        String sum = ConcurrentAuditWriter.createSummary( evt );
        Base64Codec codec = new Base64Codec();
        String cred = new String( codec.encode( ( user + ":" + pass ).getBytes() ) );

        HttpURLConnection con = this.getConnection();

        try {
            //
View Full Code Here

Examples of org.jwall.web.audit.util.Base64Codec

                    if( line.toLowerCase().startsWith("authentication:") ){
                        //
                        // extract the sensor-id and check the password
                        //
                        String[] t = line.substring( "authentication".length() ).split( " " );
                        Base64Codec codec = new Base64Codec();
                        String userpass = new String( codec.decode( t[1].getBytes() ) );

                        int k = 0;
                        for(int i = userpass.length() - 1; i >= 0; i--)
                            if(userpass.charAt(i) == ':'){
                                k = i;
View Full Code Here

Examples of org.jwall.web.audit.util.Base64Codec

 
  static Logger log = LoggerFactory.getLogger( GenerateLargeEvent.class );
 
 
  public static void writeRandomData( PrintWriter writer, long size ){
    Base64Codec b64 = new Base64Codec();
    Random rnd = new Random();
    long written = 0;
   
    final byte[] buf = new byte[16 * 1024];
    rnd.nextBytes( buf );
   
    char[] newline = new char[]{ '\r', '\n' };
   
    while( written < size ){
      Long remain = size - written;
      int write = Math.min( buf.length, remain.intValue() );
      byte[] encoded = b64.encode( buf );
      for( int i = 0; i < write && i < buf.length; i++ ){
        writer.write( (int) encoded[i] );
        written++;
        if( i > 0 && written % 80 == 0 ){
          writer.write( newline );
View Full Code Here
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.