anchor.diff:      return hmac.close();
     }
     
  -  Request authenticateRequest(Request req, [version = 4]){
  -    //preperare request.
  -    req = prepare(req,version);
  -    
  -    //get string to sign.
  -    var string = toSign(req, version);
  -    
  -    //get signing key.
  -    var key = getKey(req, version);
  -    
  -    //sign request.
  -    var hmac = sign(key,string);
  -    
  -    //write authentication.
  -    if(version == 4){
  -      return writeAuth4(req,hmac);
  -    }else{
  -      return writeAuth2(req,hmac);
  -    }
  +  String version2date(String date){
  +    return date;
     }
  -  
  -  Request prepare(Request req, [version = 4]){
  -    if(version == 2){
  -      //v2 need most of autetication parametes set before signing.
  -      var query = new Map.from( req.uri.queryParameters);
  -      query['AWSAccessKeyId'] = accessKey;
  -      query['SignatureVersion'] = '2';
  -      query['SignatureMethod'] = 'HmacSHA256';
  -      query['Timestamp'] = iso.format(req.time);
  -      req.uri = new Uri(scheme: req.uri.scheme, userInfo: req.uri.userInfo, 
  -          host: req.uri.host, port: req.uri.port,
  -          path: req.uri.path, query: req.uri.query);
  -    }
  -    
  -    return req;
  -  }
  -  
  -  Request writeAuth2(Request req, key){
  -    var query = req.uri.queryParameters;
  -    query['Signature'] = toUrl(key);
  -    req.uri = new Uri(scheme: req.uri.scheme, userInfo: req.uri.userInfo, 
  -              host: req.uri.host, port: req.uri.port,
  -              path: req.uri.path, query: req.uri.query);
  -    return req;
  -  }
  -  
  -  Request writeAuth4(Request req, key){
  -    var auth = new StringBuffer();
  -    auth.write('AWS4-HMAC-SHA256 Credential=');
  -    auth.write(accessKey);
  -    auth.write('/');
  -    auth.write(credentialScope(scope(req)));
  -    auth.write(', SignedHeaders=');
  -    auth.write(signedHeaders(req.headers.keys));
  -    auth.write(', Signature=');
  -    auth.write(toHex(key));
  -    
  -    req.headers['Authorization'] = auth.toString();
  -    return req;
  -  }
  -
  -  String toUrl(List<int> hash) 
  -      => Uri.encodeComponent(CryptoUtils.bytesToBase64(hash));
  -  
  -  String toHex(List<int> hash) 
  -      => CryptoUtils.bytesToHex(hash);
     
     List<int> getSigningKey(List<String> scope){
       return scope.fold(UTF8.encode('AWS4' + secretKey), hmac);
  
positive.code:   Sign(this.accessKey,this.secretKey);
    
    Request sign2(Request req){
      return req;
    }
    
  
negative.code: class Sign{
    static final algorithm = 'AWS4-HMAC-SHA256';
    var iso = new DateFormat('yyyy-MM-ddTHH:mm:ss');
    
    final String accessKey;
    final String secretKey;
  