Changeset 220953 in webkit


Ignore:
Timestamp:
Aug 19, 2017 9:41:47 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[Mac] Change uint8_t* to Vector<uint8_t> type in all crypto algorithm implementation
https://bugs.webkit.org/show_bug.cgi?id=164939

Patch by Sam Weinig <sam@webkit.org> on 2017-08-19
Reviewed by Chris Dumez.

Address FIXMEs, replacing uint8_t*/size_t parameters with Vector<uint8_t>&.

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_KWMac.cpp:

(WebCore::wrapKeyAES_KW):
(WebCore::unwrapKeyAES_KW):
(WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
(WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):

  • crypto/mac/CryptoAlgorithmHMACMac.cpp:

(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::encryptRSAES_PKCS1_v1_5):
(WebCore::decryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:

(WebCore::signRSASSA_PKCS1_v1_5):
(WebCore::verifyRSASSA_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::encryptRSA_OAEP):
(WebCore::decryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r220951 r220953  
     12017-08-19  Sam Weinig  <sam@webkit.org>
     2
     3        [Mac] Change uint8_t* to Vector<uint8_t> type in all crypto algorithm implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=164939
     5
     6        Reviewed by Chris Dumez.
     7
     8        Address FIXMEs, replacing uint8_t*/size_t parameters with Vector<uint8_t>&.
     9
     10        * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
     11        (WebCore::transformAES_CBC):
     12        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
     13        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
     14        * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
     15        (WebCore::wrapKeyAES_KW):
     16        (WebCore::unwrapKeyAES_KW):
     17        (WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
     18        (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):
     19        * crypto/mac/CryptoAlgorithmHMACMac.cpp:
     20        (WebCore::calculateSignature):
     21        (WebCore::CryptoAlgorithmHMAC::platformSign):
     22        (WebCore::CryptoAlgorithmHMAC::platformVerify):
     23        * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
     24        (WebCore::encryptRSAES_PKCS1_v1_5):
     25        (WebCore::decryptRSAES_PKCS1_v1_5):
     26        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
     27        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
     28        * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
     29        (WebCore::signRSASSA_PKCS1_v1_5):
     30        (WebCore::verifyRSASSA_PKCS1_v1_5):
     31        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
     32        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
     33        * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
     34        (WebCore::encryptRSA_OAEP):
     35        (WebCore::decryptRSA_OAEP):
     36        (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
     37        (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
     38
    1392017-08-18  Ryosuke Niwa  <rniwa@webkit.org>
    240
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp

    r220941 r220953  
    3636namespace WebCore {
    3737
    38 // FIXME: We should change iv and data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    39 // https://bugs.webkit.org/show_bug.cgi?id=164939
    40 static ExceptionOr<Vector<uint8_t>> transformAES_CBC(CCOperation operation, const uint8_t* iv, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
     38static ExceptionOr<Vector<uint8_t>> transformAES_CBC(CCOperation operation, const Vector<uint8_t>& iv, const Vector<uint8_t>& key, const Vector<uint8_t>& data)
    4139{
    4240    CCCryptorRef cryptor;
    43     CCCryptorStatus status = CCCryptorCreate(operation, kCCAlgorithmAES, kCCOptionPKCS7Padding, key.data(), key.size(), iv, &cryptor);
     41    CCCryptorStatus status = CCCryptorCreate(operation, kCCAlgorithmAES, kCCOptionPKCS7Padding, key.data(), key.size(), iv.data(), &cryptor);
    4442    if (status)
    4543        return Exception { OperationError };
    4644
    47     Vector<uint8_t> result(CCCryptorGetOutputLength(cryptor, dataLength, true));
     45    Vector<uint8_t> result(CCCryptorGetOutputLength(cryptor, data.size(), true));
    4846
    4947    size_t bytesWritten;
    50     status = CCCryptorUpdate(cryptor, data, dataLength, result.data(), result.size(), &bytesWritten);
     48    status = CCCryptorUpdate(cryptor, data.data(), data.size(), result.data(), result.size(), &bytesWritten);
    5149    if (status)
    5250        return Exception { OperationError };
     
    7371        auto& aesKey = downcast<CryptoKeyAES>(key.get());
    7472        ASSERT(aesParameters.ivVector().size() == kCCBlockSizeAES128);
    75         auto result = transformAES_CBC(kCCEncrypt, aesParameters.ivVector().data(), aesKey.key(), plainText.data(), plainText.size());
     73        auto result = transformAES_CBC(kCCEncrypt, aesParameters.ivVector(), aesKey.key(), plainText);
    7674        if (result.hasException()) {
    7775            // We should only dereference callbacks after being back to the Document/Worker threads.
     
    9795        auto& aesKey = downcast<CryptoKeyAES>(key.get());
    9896        assert(aesParameters.ivVector().size() == kCCBlockSizeAES128);
    99         auto result = transformAES_CBC(kCCDecrypt, aesParameters.ivVector().data(), aesKey.key(), cipherText.data(), cipherText.size());
     97        auto result = transformAES_CBC(kCCDecrypt, aesParameters.ivVector(), aesKey.key(), cipherText);
    10098        if (result.hasException()) {
    10199            // We should only dereference callbacks after being back to the Document/Worker threads.
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_KWMac.cpp

    r220941 r220953  
    3434namespace WebCore {
    3535
    36 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    37 // https://bugs.webkit.org/show_bug.cgi?id=164939
    38 static ExceptionOr<Vector<uint8_t>> wrapKeyAES_KW(const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
     36static ExceptionOr<Vector<uint8_t>> wrapKeyAES_KW(const Vector<uint8_t>& key, const Vector<uint8_t>& data)
    3937{
    40     Vector<uint8_t> result(CCSymmetricWrappedSize(kCCWRAPAES, dataLength));
     38    Vector<uint8_t> result(CCSymmetricWrappedSize(kCCWRAPAES, data.size()));
    4139    size_t resultSize = result.size();
    42     if (CCSymmetricKeyWrap(kCCWRAPAES, CCrfc3394_iv, CCrfc3394_ivLen, key.data(), key.size(), data, dataLength, result.data(), &resultSize))
     40    if (CCSymmetricKeyWrap(kCCWRAPAES, CCrfc3394_iv, CCrfc3394_ivLen, key.data(), key.size(), data.data(), data.size(), result.data(), &resultSize))
    4341        return Exception { OperationError };
    4442
     
    4745}
    4846
    49 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    50 // https://bugs.webkit.org/show_bug.cgi?id=164939
    51 static ExceptionOr<Vector<uint8_t>> unwrapKeyAES_KW(const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
     47static ExceptionOr<Vector<uint8_t>> unwrapKeyAES_KW(const Vector<uint8_t>& key, const Vector<uint8_t>& data)
    5248{
    53     Vector<uint8_t> result(CCSymmetricUnwrappedSize(kCCWRAPAES, dataLength));
     49    Vector<uint8_t> result(CCSymmetricUnwrappedSize(kCCWRAPAES, data.size()));
    5450    size_t resultSize = result.size();
    5551
     
    5753        return Exception { OperationError };
    5854
    59     if (CCSymmetricKeyUnwrap(kCCWRAPAES, CCrfc3394_iv, CCrfc3394_ivLen, key.data(), key.size(), data, dataLength, result.data(), &resultSize))
     55    if (CCSymmetricKeyUnwrap(kCCWRAPAES, CCrfc3394_iv, CCrfc3394_ivLen, key.data(), key.size(), data.data(), data.size(), result.data(), &resultSize))
    6056        return Exception { OperationError };
    6157
     
    6763{
    6864    auto& aesKey = downcast<CryptoKeyAES>(key.get());
    69     auto result = wrapKeyAES_KW(aesKey.key(), data.data(), data.size());
     65    auto result = wrapKeyAES_KW(aesKey.key(), data);
    7066    if (result.hasException()) {
    7167        exceptionCallback(result.releaseException().code());
     
    7874{
    7975    auto& aesKey = downcast<CryptoKeyAES>(key.get());
    80     auto result = unwrapKeyAES_KW(aesKey.key(), data.data(), data.size());
     76    auto result = unwrapKeyAES_KW(aesKey.key(), data);
    8177    if (result.hasException()) {
    8278        exceptionCallback(result.releaseException().code());
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmHMACMac.cpp

    r220941 r220953  
    5454}
    5555
    56 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    57 // https://bugs.webkit.org/show_bug.cgi?id=164939
    58 static Vector<uint8_t> calculateSignature(CCHmacAlgorithm algorithm, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
     56static Vector<uint8_t> calculateSignature(CCHmacAlgorithm algorithm, const Vector<uint8_t>& key, const Vector<uint8_t>& data)
    5957{
    6058    size_t digestLength;
     
    8179
    8280    Vector<uint8_t> result(digestLength);
    83     CCHmac(algorithm, key.data(), key.size(), data, dataLength, result.data());
     81    CCHmac(algorithm, key.data(), key.size(), data.data(), data.size(), result.data());
    8482    return result;
    8583}
     
    9997            return;
    10098        }
    101         auto result = calculateSignature(*algorithm, hmacKey.key(), data.data(), data.size());
     99        auto result = calculateSignature(*algorithm, hmacKey.key(), data);
    102100        // We should only dereference callbacks after being back to the Document/Worker threads.
    103101        context.postTask([callback = WTFMove(callback), result = WTFMove(result), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) {
     
    123121            return;
    124122        }
    125         auto expectedSignature = calculateSignature(*algorithm, hmacKey.key(), data.data(), data.size());
     123        auto expectedSignature = calculateSignature(*algorithm, hmacKey.key(), data);
    126124        // Using a constant time comparison to prevent timing attacks.
    127125        bool result = signature.size() == expectedSignature.size() && !constantTimeMemcmp(expectedSignature.data(), signature.data(), expectedSignature.size());
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp

    r220941 r220953  
    3535namespace WebCore {
    3636
    37 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    38 // https://bugs.webkit.org/show_bug.cgi?id=164939
    39 static ExceptionOr<Vector<uint8_t>> encryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
     37static ExceptionOr<Vector<uint8_t>> encryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const Vector<uint8_t>& data)
    4038{
    4139    Vector<uint8_t> cipherText(keyLength / 8); // Per Step 3.c of https://tools.ietf.org/html/rfc3447#section-7.2.1
    4240    size_t cipherTextLength = cipherText.size();
    43     if (CCRSACryptorEncrypt(key, ccPKCS1Padding, data, dataLength, cipherText.data(), &cipherTextLength, 0, 0, kCCDigestNone))
     41    if (CCRSACryptorEncrypt(key, ccPKCS1Padding, data.data(), data.size(), cipherText.data(), &cipherTextLength, 0, 0, kCCDigestNone))
    4442        return Exception { OperationError };
    4543
     
    4745}
    4846
    49 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    50 // https://bugs.webkit.org/show_bug.cgi?id=164939
    51 static ExceptionOr<Vector<uint8_t>> decryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
     47static ExceptionOr<Vector<uint8_t>> decryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const Vector<uint8_t>& data)
    5248{
    5349    Vector<uint8_t> plainText(keyLength / 8); // Per Step 1 of https://tools.ietf.org/html/rfc3447#section-7.2.1
    5450    size_t plainTextLength = plainText.size();
    55     if (CCRSACryptorDecrypt(key, ccPKCS1Padding, data, dataLength, plainText.data(), &plainTextLength, 0, 0, kCCDigestNone))
     51    if (CCRSACryptorDecrypt(key, ccPKCS1Padding, data.data(), data.size(), plainText.data(), &plainTextLength, 0, 0, kCCDigestNone))
    5652        return Exception { OperationError };
    5753
     
    6561    workQueue.dispatch([key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable {
    6662        auto& rsaKey = downcast<CryptoKeyRSA>(key.get());
    67         auto result = encryptRSAES_PKCS1_v1_5(rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText.data(), plainText.size());
     63        auto result = encryptRSAES_PKCS1_v1_5(rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText);
    6864        if (result.hasException()) {
    6965            // We should only dereference callbacks after being back to the Document/Worker threads.
     
    8783    workQueue.dispatch([key = WTFMove(key), cipherText = WTFMove(cipherText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable {
    8884        auto& rsaKey = downcast<CryptoKeyRSA>(key.get());
    89         auto result = decryptRSAES_PKCS1_v1_5(rsaKey.platformKey(), rsaKey.keySizeInBits(), cipherText.data(), cipherText.size());
     85        auto result = decryptRSAES_PKCS1_v1_5(rsaKey.platformKey(), rsaKey.keySizeInBits(), cipherText);
    9086        if (result.hasException()) {
    9187            // We should only dereference callbacks after being back to the Document/Worker threads.
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp

    r220941 r220953  
    3636namespace WebCore {
    3737
    38 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    39 // https://bugs.webkit.org/show_bug.cgi?id=164939
    40 static ExceptionOr<Vector<uint8_t>> signRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
     38static ExceptionOr<Vector<uint8_t>> signRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, size_t keyLength, const Vector<uint8_t>& data)
    4139{
    4240    CCDigestAlgorithm digestAlgorithm;
     
    5048    if (!digest)
    5149        return Exception { OperationError };
    52     digest->addBytes(data, dataLength);
     50    digest->addBytes(data.data(), data.size());
    5351    auto digestData = digest->computeHash();
    5452
     
    6361}
    6462
    65 // FIXME: We should change signature, data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    66 // https://bugs.webkit.org/show_bug.cgi?id=164939
    67 static ExceptionOr<bool> verifyRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, const uint8_t* signature, size_t signatureLength, const uint8_t* data, size_t dataLength)
     63static ExceptionOr<bool> verifyRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, const Vector<uint8_t>& signature, const Vector<uint8_t>& data)
    6864{
    6965    CCDigestAlgorithm digestAlgorithm;
     
    7773    if (!digest)
    7874        return Exception { OperationError };
    79     digest->addBytes(data, dataLength);
     75    digest->addBytes(data.data(), data.size());
    8076    auto digestData = digest->computeHash();
    8177
    82     auto status = CCRSACryptorVerify(key, ccPKCS1Padding, digestData.data(), digestData.size(), digestAlgorithm, 0, signature, signatureLength);
     78    auto status = CCRSACryptorVerify(key, ccPKCS1Padding, digestData.data(), digestData.size(), digestAlgorithm, 0, signature.data(), signature.size());
    8379    if (!status)
    8480        return true;
     
    9490    workQueue.dispatch([key = WTFMove(key), data = WTFMove(data), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable {
    9591        auto& rsaKey = downcast<CryptoKeyRSA>(key.get());
    96         auto result = signRSASSA_PKCS1_v1_5(rsaKey.hashAlgorithmIdentifier(), rsaKey.platformKey(), rsaKey.keySizeInBits(), data.data(), data.size());
     92        auto result = signRSASSA_PKCS1_v1_5(rsaKey.hashAlgorithmIdentifier(), rsaKey.platformKey(), rsaKey.keySizeInBits(), data);
    9793        if (result.hasException()) {
    9894            // We should only dereference callbacks after being back to the Document/Worker threads.
     
    116112    workQueue.dispatch([key = WTFMove(key), signature = WTFMove(signature), data = WTFMove(data), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable {
    117113        auto& rsaKey = downcast<CryptoKeyRSA>(key.get());
    118         auto result = verifyRSASSA_PKCS1_v1_5(rsaKey.hashAlgorithmIdentifier(), rsaKey.platformKey(), signature.data(), signature.size(), data.data(), data.size());
     114        auto result = verifyRSASSA_PKCS1_v1_5(rsaKey.hashAlgorithmIdentifier(), rsaKey.platformKey(), signature, data);
    119115        if (result.hasException()) {
    120116            // We should only dereference callbacks after being back to the Document/Worker threads.
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp

    r220941 r220953  
    3636namespace WebCore {
    3737
    38 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    39 // https://bugs.webkit.org/show_bug.cgi?id=164939
    40 static ExceptionOr<Vector<uint8_t>> encryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
     38static ExceptionOr<Vector<uint8_t>> encryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const Vector<uint8_t>& data)
    4139{
    4240    CCDigestAlgorithm digestAlgorithm;
     
    4644    Vector<uint8_t> cipherText(keyLength / 8); // Per Step 3.c of https://tools.ietf.org/html/rfc3447#section-7.1.1
    4745    size_t cipherTextLength = cipherText.size();
    48     if (CCRSACryptorEncrypt(key, ccOAEPPadding, data, dataLength, cipherText.data(), &cipherTextLength, label.data(), label.size(), digestAlgorithm))
     46    if (CCRSACryptorEncrypt(key, ccOAEPPadding, data.data(), data.size(), cipherText.data(), &cipherTextLength, label.data(), label.size(), digestAlgorithm))
    4947        return Exception { OperationError };
    5048
     
    5250}
    5351
    54 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated.
    55 // https://bugs.webkit.org/show_bug.cgi?id=164939
    56 static ExceptionOr<Vector<uint8_t>> decryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
     52static ExceptionOr<Vector<uint8_t>> decryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const Vector<uint8_t>& data)
    5753{
    5854    CCDigestAlgorithm digestAlgorithm;
     
    6258    Vector<uint8_t> plainText(keyLength / 8); // Per Step 1.b of https://tools.ietf.org/html/rfc3447#section-7.1.1
    6359    size_t plainTextLength = plainText.size();
    64     if (CCRSACryptorDecrypt(key, ccOAEPPadding, data, dataLength, plainText.data(), &plainTextLength, label.data(), label.size(), digestAlgorithm))
     60    if (CCRSACryptorDecrypt(key, ccOAEPPadding, data.data(), data.size(), plainText.data(), &plainTextLength, label.data(), label.size(), digestAlgorithm))
    6561        return Exception { OperationError };
    6662
     
    7571        auto& rsaParameters = downcast<CryptoAlgorithmRsaOaepParams>(*parameters);
    7672        auto& rsaKey = downcast<CryptoKeyRSA>(key.get());
    77         auto result = encryptRSA_OAEP(rsaKey.hashAlgorithmIdentifier(), rsaParameters.labelVector(), rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText.data(), plainText.size());
     73        auto result = encryptRSA_OAEP(rsaKey.hashAlgorithmIdentifier(), rsaParameters.labelVector(), rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText);
    7874        if (result.hasException()) {
    7975            // We should only dereference callbacks after being back to the Document/Worker threads.
     
    9894        auto& rsaParameters = downcast<CryptoAlgorithmRsaOaepParams>(*parameters);
    9995        auto& rsaKey = downcast<CryptoKeyRSA>(key.get());
    100         auto result = decryptRSA_OAEP(rsaKey.hashAlgorithmIdentifier(), rsaParameters.labelVector(), rsaKey.platformKey(), rsaKey.keySizeInBits(), cipherText.data(), cipherText.size());
     96        auto result = decryptRSA_OAEP(rsaKey.hashAlgorithmIdentifier(), rsaParameters.labelVector(), rsaKey.platformKey(), rsaKey.keySizeInBits(), cipherText);
    10197        if (result.hasException()) {
    10298            // We should only dereference callbacks after being back to the Document/Worker threads.
Note: See TracChangeset for help on using the changeset viewer.