VirtualBox

Ignore:
Timestamp:
Aug 5, 2020 1:27:58 PM (4 years ago)
Author:
vboxsync
Message:

IPRT: Adding SHA-3. bugref:9734

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/digest-core.cpp

    r84248 r85614  
    428428        case RTDIGESTTYPE_SHA512T224:   return RTCRX509ALGORITHMIDENTIFIERID_SHA512T224;
    429429        case RTDIGESTTYPE_SHA512T256:   return RTCRX509ALGORITHMIDENTIFIERID_SHA512T256;
     430        case RTDIGESTTYPE_SHA3_224:     return RTCRX509ALGORITHMIDENTIFIERID_SHA3_224;
     431        case RTDIGESTTYPE_SHA3_256:     return RTCRX509ALGORITHMIDENTIFIERID_SHA3_256;
     432        case RTDIGESTTYPE_SHA3_384:     return RTCRX509ALGORITHMIDENTIFIERID_SHA3_384;
     433        case RTDIGESTTYPE_SHA3_512:     return RTCRX509ALGORITHMIDENTIFIERID_SHA3_512;
    430434        default:                        return NULL;
    431435    }
     
    449453        case RTDIGESTTYPE_SHA512T224:   return "SHA-512/224";
    450454        case RTDIGESTTYPE_SHA512T256:   return "SHA-512/256";
     455        case RTDIGESTTYPE_SHA3_224:     return "SHA3-224";
     456        case RTDIGESTTYPE_SHA3_256:     return "SHA3-256";
     457        case RTDIGESTTYPE_SHA3_384:     return "SHA3-384";
     458        case RTDIGESTTYPE_SHA3_512:     return "SHA3-512";
    451459        default:                        return NULL;
    452460    }
     
    470478        case RTDIGESTTYPE_SHA512T224:   return 224 / 8;
    471479        case RTDIGESTTYPE_SHA512T256:   return 256 / 8;
     480        case RTDIGESTTYPE_SHA3_224:     return 224 / 8;
     481        case RTDIGESTTYPE_SHA3_256:     return 256 / 8;
     482        case RTDIGESTTYPE_SHA3_384:     return 384 / 8;
     483        case RTDIGESTTYPE_SHA3_512:     return 512 / 8;
    472484        default:
    473485            AssertFailed();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette