iv = Internals::generateIV();
}
- Internals::deriveKBKDF(getBinary(), alg, pass, iv, tag, hash);
+ Internals::deriveKBKDF(getId(), alg, pass, iv, tag, hash);
return Token(backendId(), DataType(KeyType::KEY_AES), Store::pack(hash, pass, iv, tag));
}
passIV = Internals::generateIV();
}
- Internals::importWrappedKey(getBinary(),
+ Internals::importWrappedKey(getId(),
getPassword(),
params,
encryptedKey,
keyToWrapIV,
keyToWrapTag);
- return Internals::exportWrappedKey(getBinary(),
+ return Internals::exportWrappedKey(getId(),
getPassword(),
alg,
keyToWrapId,
RawBuffer SKey::encrypt(const CryptoAlgorithm &alg, const RawBuffer &data)
{
- return Internals::symmetricEncrypt(getBinary(), getPassword(), alg, data);
+ return Internals::symmetricEncrypt(getId(), getPassword(), alg, data);
}
RawBuffer SKey::decrypt(const CryptoAlgorithm &alg, const RawBuffer &cipher)
{
- return Internals::symmetricDecrypt(getBinary(), getPassword(), alg, cipher);
+ return Internals::symmetricDecrypt(getId(), getPassword(), alg, cipher);
}
GCtxShPtr SKey::initContext(const CryptoAlgorithm &alg, bool onward)
{
- auto opId = Internals::initCipher(getBinary(), getPassword(), alg, onward);
+ auto opId = Internals::initCipher(getId(), getPassword(), alg, onward);
return std::make_shared<CipherCtx>(opId);
}
RawBuffer AKey::encrypt(const CryptoAlgorithm &alg, const RawBuffer &data)
{
- return Internals::asymmetricEncrypt(getBinary(), getPassword(), alg, data);
+ return Internals::asymmetricEncrypt(getId(), getPassword(), alg, data);
}
RawBuffer AKey::decrypt(const CryptoAlgorithm &alg, const RawBuffer &cipher)
{
- return Internals::asymmetricDecrypt(getBinary(), getPassword(), alg, cipher);
+ return Internals::asymmetricDecrypt(getId(), getPassword(), alg, cipher);
}
Token AKey::derive(const CryptoAlgorithm &alg, const Password &pass, const RawBuffer &hash)
iv = Internals::generateIV();
}
- Internals::deriveECDH(getBinary(), getPassword(), pubKey, pass, iv, tag, hash);
+ Internals::deriveECDH(getId(), getPassword(), pubKey, pass, iv, tag, hash);
return Token(backendId(), DataType::BINARY_DATA, Store::pack(hash, pass, iv, tag));
}
{
CryptoAlgorithm algWithType(alg);
algWithType.setParam(ParamName::ALGO_TYPE, key2algo(m_type));
- return Internals::sign(getBinary(), getPassword(), algWithType, message);
+ return Internals::sign(getId(), getPassword(), algWithType, message);
}
int AKey::verify(const CryptoAlgorithm &alg, const RawBuffer &message,
algWithType.setParam(ParamName::ALGO_TYPE, key2algo(m_type));
}
- return Internals::verify(getBinary(), getPassword(), algWithType, message, sign);
+ return Internals::verify(getId(), getPassword(), algWithType, message, sign);
}
Token Cert::unwrap(const CryptoAlgorithm &,