Ejemplo n.º 1
0
EC_PublicKeyImportProperties::EC_PublicKeyImportProperties(const std::vector<uint8_t>& ec_params,
      const std::vector<uint8_t>& ec_point)
   : PublicKeyProperties(KeyType::Ec), m_ec_params(ec_params), m_ec_point(ec_point)
   {
   add_binary(AttributeType::EcParams, m_ec_params);
   add_binary(AttributeType::EcPoint, m_ec_point);
   }
Ejemplo n.º 2
0
int main()
{
    int a[] = {1, 1, 0, 1, 0, 1, 1, 1};
    int b[] = {0, 1, 0, 0, 1, 1, 0, 1};
    int c[9] = {0};
    add_binary(a, b, c, 8);
    int i;
    printf("  ");
    for (i = 0; i < 8; ++i)
        printf("%d ", a[i]);
    printf("\n");
    printf("  ");
    for (i = 0; i < 8; ++i)
        printf("%d ", b[i]);
    printf("\n");
    for (i = 0; i < 9; ++i)
        printf("%d ", c[i]);
    printf("\n");
}
Ejemplo n.º 3
0
EC_PrivateKeyImportProperties::EC_PrivateKeyImportProperties(const std::vector<uint8_t>& ec_params, const BigInt& value)
   : PrivateKeyProperties(KeyType::Ec), m_ec_params(ec_params), m_value(value)
   {
   add_binary(AttributeType::EcParams, m_ec_params);
   add_binary(AttributeType::Value, BigInt::encode(m_value));
   }
Ejemplo n.º 4
0
EC_PublicKeyGenerationProperties::EC_PublicKeyGenerationProperties(const std::vector<uint8_t>& ec_params)
   : PublicKeyProperties(KeyType::Ec), m_ec_params(ec_params)
   {
   add_binary(AttributeType::EcParams, m_ec_params);
   }
Ejemplo n.º 5
0
X509_CertificateProperties::X509_CertificateProperties(const std::vector<byte>& subject, const std::vector<byte>& value)
   : CertificateProperties(CertificateType::X509), m_subject(subject), m_value(value)
   {
   add_binary(AttributeType::Subject, m_subject);
   add_binary(AttributeType::Value, m_value);
   }