当前位置: 首页>>代码示例>>Java>>正文


Java OpenPgpSignatureResult.RESULT_VALID_CONFIRMED属性代码示例

本文整理汇总了Java中org.openintents.openpgp.OpenPgpSignatureResult.RESULT_VALID_CONFIRMED属性的典型用法代码示例。如果您正苦于以下问题:Java OpenPgpSignatureResult.RESULT_VALID_CONFIRMED属性的具体用法?Java OpenPgpSignatureResult.RESULT_VALID_CONFIRMED怎么用?Java OpenPgpSignatureResult.RESULT_VALID_CONFIRMED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.openintents.openpgp.OpenPgpSignatureResult的用法示例。


在下文中一共展示了OpenPgpSignatureResult.RESULT_VALID_CONFIRMED属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: signatureResultToUiText

public static String signatureResultToUiText(Context ctx, OpenPgpSignatureResult sr) {
    switch (sr.getResult()) {
        case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
            return ctx.getString(R.string.signature_result__invalid_insecure);
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
            return ctx.getString(R.string.signature_result__invalid_key_expired);
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
            return ctx.getString(R.string.signature_result__invalid_key_revoked);
        case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
            return ctx.getString(R.string.signature_result__invalid);
        case OpenPgpSignatureResult.RESULT_KEY_MISSING:
            return ctx.getString(R.string.signature_result__key_missing);
        case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
            return ctx.getString(R.string.signature_result__no_signature);
        case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
            return ctx.getString(R.string.signature_result__valid_confirmed);
        case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
            return ctx.getString(R.string.signature_result__valid_unconfirmed);
        default:
            return null;
    }
}
 
开发者ID:oversecio,项目名称:oversec_crypto,代码行数:22,代码来源:GpgCryptoHandler.java

示例2: signatureResultToUiColorResId

public static int signatureResultToUiColorResId(OpenPgpSignatureResult sr) {
    switch (sr.getResult()) {
        case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
            return R.color.colorWarning;
        case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
        case OpenPgpSignatureResult.RESULT_KEY_MISSING:
        case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
            return R.color.colorError;
        case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
        case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
            return R.color.colorOk;
        default:
            return 0;
    }
}
 
开发者ID:oversecio,项目名称:oversec_crypto,代码行数:17,代码来源:GpgCryptoHandler.java

示例3: signatureResultToUiIconRes

public static int signatureResultToUiIconRes(OpenPgpSignatureResult sr, boolean small) {
    switch (sr.getResult()) {
        case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
        case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
            return small ? R.drawable.ic_error_red_18dp : R.drawable.ic_error_red_24dp;
        case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
            return small ? R.drawable.ic_warning_red_18dp : R.drawable.ic_warning_red_24dp;
        case OpenPgpSignatureResult.RESULT_KEY_MISSING:
            return small ? R.drawable.ic_warning_orange_18dp : R.drawable.ic_warning_orange_24dp;
        case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
            return small ? R.drawable.ic_done_orange_18dp : R.drawable.ic_done_orange_24dp;
        case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
            return small ? R.drawable.ic_done_all_green_a700_18dp : R.drawable.ic_done_all_green_a700_24dp;
        default:
            return 0;
    }
}
 
开发者ID:oversecio,项目名称:oversec_crypto,代码行数:19,代码来源:GpgCryptoHandler.java

示例4: signatureResultToUiColorResId_KeyOnly

public static int signatureResultToUiColorResId_KeyOnly(OpenPgpSignatureResult sr) {
    switch (sr.getResult()) {
        case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
        case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
        case OpenPgpSignatureResult.RESULT_KEY_MISSING:
        case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
        case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
            return R.color.colorWarning;
        case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
            return R.color.colorOk;
        default:
            return 0;
    }
}
 
开发者ID:oversecio,项目名称:oversec_crypto,代码行数:16,代码来源:GpgCryptoHandler.java

示例5: signatureResultToUiIconRes_KeyOnly

public static int signatureResultToUiIconRes_KeyOnly(OpenPgpSignatureResult sr, boolean small) {
    switch (sr.getResult()) {
        case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
        case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
        case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
        case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
        case OpenPgpSignatureResult.RESULT_KEY_MISSING:
        case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
            return small ? R.drawable.ic_warning_red_18dp : R.drawable.ic_warning_red_24dp;
        case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
            return small ? R.drawable.ic_done_green_a700_18dp : R.drawable.ic_done_green_a700_24dp;
        default:
            return 0;
    }
}
 
开发者ID:oversecio,项目名称:oversec_crypto,代码行数:16,代码来源:GpgCryptoHandler.java


注:本文中的org.openintents.openpgp.OpenPgpSignatureResult.RESULT_VALID_CONFIRMED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。