Sha256: 3619d5d3ef96dfc5aa441b09a0f2ae4787f82568fbaefeba40c107470e5d9085

Contents?: true

Size: 1013 Bytes

Versions: 1

Compression:

Stored size: 1013 Bytes

Contents

require 'fiddle'
require 'fiddle/import'

module Oqs
  module SIGWrapper
   extend Fiddle::Importer
   include Oqs::Wrapper

   ## OQS_STATUS
   #OQS_ERROR = -1
   #OQS_SUCCESS = 0
   #OQS_EXTERNAL_LIB_ERROR_OPENSSL = 50
    
   #dlload File.join(File.dirname(__FILE__),"..","..","native","linux","x86_64","liboqs.so.0.7.0")
   load_oqs_lib

   extern 'const char * OQS_SIG_alg_identifier(size_t i)'
   extern 'int OQS_SIG_alg_count(void)'
   extern 'int OQS_SIG_alg_is_enabled(const char * name)'

   extern 'OQS_SIG * OQS_SIG_new(const char * algo)'
   extern 'void OQS_SIG_free(OQS_SIG * sig)'

   extern 'int OQS_SIG_keypair(const OQS_SIG *sig, uint8_t *public_key, uint8_t *secret_key)'
   
   extern 'int OQS_SIG_sign(const OQS_SIG *sig, uint8_t * signature, size_t *signature_len, uint8_t *message, size_t message_len, uint8_t *secret_key)'
   extern 'int OQS_SIG_verify(const OQS_SIG *sig, uint8_t * message, size_t message_len, uint8_t *signature, size_t signature_len, uint8_t *public_key)'

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
liboqs-0.1.0 lib/oqs/sig_wrapper.rb