Example #1
0
  public OCApiLiveConnector(
      String name, String host, String prefix, int cKResId, int cSResId, ApiSupport apiSupport) {
    super(
        name,
        host,
        prefix,
        CryptUtils.rot13(cgeoapplication.getInstance().getResources().getString(cKResId)),
        apiSupport);

    cS = CryptUtils.rot13(cgeoapplication.getInstance().getResources().getString(cSResId));
  }
Example #2
0
 private static File buildFile(
     final File base, final String fileName, final boolean isUrl, final boolean createDirs) {
   if (createDirs) {
     FileUtils.mkdirs(base);
   }
   return new File(base, isUrl ? CryptUtils.md5(fileName) + getExtension(fileName) : fileName);
 }
Example #3
0
  @Override
  public String getCacheId() {
    if (StringUtils.isBlank(cacheId) && getConnector().equals(GCConnector.getInstance())) {
      return CryptUtils.convertToGcBase31(geocode);
    }

    return cacheId;
  }
Example #4
0
  public OCApiLiveConnector(
      final String name,
      final String host,
      final String prefix,
      final String licenseString,
      final int cKResId,
      final int cSResId,
      final int isActivePrefKeyId,
      final int tokenPublicPrefKeyId,
      final int tokenSecretPrefKeyId,
      final ApiSupport apiSupport) {
    super(
        name,
        host,
        prefix,
        CryptUtils.rot13(CgeoApplication.getInstance().getResources().getString(cKResId)),
        licenseString,
        apiSupport);

    cS = CryptUtils.rot13(CgeoApplication.getInstance().getResources().getString(cSResId));
    this.isActivePrefKeyId = isActivePrefKeyId;
    this.tokenPublicPrefKeyId = tokenPublicPrefKeyId;
    this.tokenSecretPrefKeyId = tokenSecretPrefKeyId;
  }
Example #5
0
 @Override
 public String getCS() {
   return CryptUtils.rot13(cS);
 }